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
|
endfunction " }}}2
|
||||||
|
|
||||||
function! syntastic#preprocess#prospector(errors) abort " {{{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 = []
|
let out = []
|
||||||
if type(errs) == type({}) && has_key(errs, 'messages')
|
if type(json) == type({}) && has_key(json, 'messages')
|
||||||
if type(errs['messages']) == type([])
|
if type(json['messages']) == type([])
|
||||||
for e in errs['messages']
|
for e in json['messages']
|
||||||
if type(e) == type({})
|
if type(e) == type({})
|
||||||
try
|
try
|
||||||
if e['source'] ==# 'pylint'
|
if e['source'] ==# 'pylint'
|
||||||
@ -300,6 +305,8 @@ function! syntastic#preprocess#prospector(errors) abort " {{{2
|
|||||||
else
|
else
|
||||||
call syntastic#log#warn('checker python/prospector: unrecognized error format (crashed checker?)')
|
call syntastic#log#warn('checker python/prospector: unrecognized error format (crashed checker?)')
|
||||||
endif
|
endif
|
||||||
|
else
|
||||||
|
call syntastic#log#warn('checker python/prospector: unrecognized error format (crashed checker?)')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
return out
|
return out
|
||||||
|
@ -19,7 +19,7 @@ if has('reltime')
|
|||||||
lockvar! g:_SYNTASTIC_START
|
lockvar! g:_SYNTASTIC_START
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:_SYNTASTIC_VERSION = '3.8.0-55'
|
let g:_SYNTASTIC_VERSION = '3.8.0-56'
|
||||||
lockvar g:_SYNTASTIC_VERSION
|
lockvar g:_SYNTASTIC_VERSION
|
||||||
|
|
||||||
" Sanity checks {{{1
|
" Sanity checks {{{1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user