Checker python/prospector: better error reporting.
This commit is contained in:
parent
5efeecece3
commit
159900a1a2
@ -265,12 +265,17 @@ function! syntastic#preprocess#perl(errors) abort " {{{2
|
||||
endfunction " }}}2
|
||||
|
||||
function! syntastic#preprocess#prospector(errors) abort " {{{2
|
||||
let errs = s:_decode_JSON(join(a:errors, ''))
|
||||
let errs = join(a:errors, '')
|
||||
if errs ==# ''
|
||||
return []
|
||||
endif
|
||||
|
||||
let json = s:_decode_JSON(errs)
|
||||
|
||||
let out = []
|
||||
if type(errs) == type({}) && has_key(errs, 'messages')
|
||||
if type(errs['messages']) == type([])
|
||||
for e in errs['messages']
|
||||
if type(json) == type({}) && has_key(json, 'messages')
|
||||
if type(json['messages']) == type([])
|
||||
for e in json['messages']
|
||||
if type(e) == type({})
|
||||
try
|
||||
if e['source'] ==# 'pylint'
|
||||
@ -300,6 +305,8 @@ function! syntastic#preprocess#prospector(errors) abort " {{{2
|
||||
else
|
||||
call syntastic#log#warn('checker python/prospector: unrecognized error format (crashed checker?)')
|
||||
endif
|
||||
else
|
||||
call syntastic#log#warn('checker python/prospector: unrecognized error format (crashed checker?)')
|
||||
endif
|
||||
|
||||
return out
|
||||
|
@ -19,7 +19,7 @@ if has('reltime')
|
||||
lockvar! g:_SYNTASTIC_START
|
||||
endif
|
||||
|
||||
let g:_SYNTASTIC_VERSION = '3.8.0-55'
|
||||
let g:_SYNTASTIC_VERSION = '3.8.0-56'
|
||||
lockvar g:_SYNTASTIC_VERSION
|
||||
|
||||
" Sanity checks {{{1
|
||||
|
Loading…
x
Reference in New Issue
Block a user