Flow checker: use the "status" command.
This commit is contained in:
parent
ae405fed8d
commit
981196fdc3
@ -68,10 +68,15 @@ function! syntastic#preprocess#flow(errors) abort " {{{2
|
||||
let false = 0
|
||||
let null = ''
|
||||
|
||||
let idx = 0
|
||||
while idx < len(a:errors) && a:errors[idx][0] != '{'
|
||||
let idx += 1
|
||||
endwhile
|
||||
|
||||
" A hat tip to Marc Weber for this trick
|
||||
" http://stackoverflow.com/questions/17751186/iterating-over-a-string-in-vimscript-or-parse-a-json-file/19105763#19105763
|
||||
try
|
||||
let errs = eval(join(a:errors, ''))
|
||||
let errs = eval(join(a:errors[idx :], ''))
|
||||
catch
|
||||
let errs = {}
|
||||
endtry
|
||||
|
@ -19,7 +19,7 @@ if has('reltime')
|
||||
lockvar! g:_SYNTASTIC_START
|
||||
endif
|
||||
|
||||
let g:_SYNTASTIC_VERSION = '3.6.0-84'
|
||||
let g:_SYNTASTIC_VERSION = '3.6.0-85'
|
||||
lockvar g:_SYNTASTIC_VERSION
|
||||
|
||||
" Sanity checks {{{1
|
||||
|
@ -21,13 +21,20 @@ endif
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function! SyntaxCheckers_javascript_flow_IsAvailable() dict
|
||||
if !executable(self.getExec())
|
||||
return 0
|
||||
endif
|
||||
return syntastic#util#versionIsAtLeast(self.getVersion(), [0, 6])
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_javascript_flow_GetLocList() dict
|
||||
if findfile('.flowconfig', '.;') ==# ''
|
||||
return []
|
||||
endif
|
||||
|
||||
let makeprg = self.makeprgBuild({
|
||||
\ 'exe': self.getExecEscaped() . ' check',
|
||||
\ 'exe': self.getExecEscaped() . ' status',
|
||||
\ 'args_after': '--show-all-errors --json' })
|
||||
|
||||
let errorformat =
|
||||
|
Loading…
Reference in New Issue
Block a user