Fix #735 - Support old versions of Flow by only adding --respect-pragma for supported versions

This commit is contained in:
w0rp
2017-07-07 10:47:09 +01:00
parent 130928590b
commit 7ce960ae51
5 changed files with 53 additions and 9 deletions

View File

@@ -387,6 +387,16 @@ function! s:RunJob(options) abort
let l:read_buffer = 0
endif
" Add a newline to commands which need it.
" This is only used for Flow for now, and is not documented.
if l:linter.add_newline
if has('win32')
let l:command = l:command . '; echo.'
else
let l:command = l:command . '; echo'
endif
endif
let l:command = ale#job#PrepareCommand(l:command)
let l:job_options = {
\ 'mode': 'nl',

View File

@@ -50,6 +50,7 @@ function! ale#linter#PreProcess(linter) abort
endif
let l:obj = {
\ 'add_newline': get(a:linter, 'add_newline', 0),
\ 'name': get(a:linter, 'name'),
\ 'lsp': get(a:linter, 'lsp', ''),
\}