Merge pull request #1682 from fennerm/fix_prospector_e474

Fix prospector empty string error
This commit is contained in:
w0rp 2018-06-27 21:34:28 +01:00 committed by GitHub
commit b047271051
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -30,6 +30,10 @@ endfunction
function! ale_linters#python#prospector#Handle(buffer, lines) abort
let l:output = []
if empty(a:lines)
return []
endif
let l:prospector_error = json_decode(join(a:lines, ''))
for l:error in l:prospector_error.messages

View File

@ -156,3 +156,8 @@ Execute(Ignoring trailing whitespace messages should work):
\ ' ]',
\ '}',
\ ])
Execute(The prospector handler should handle empty output):
AssertEqual
\ [],
\ ale_linters#python#prospector#Handle(bufnr(''), [])