#810 Ignore output which isn't JSON for brakeman

This commit is contained in:
w0rp
2017-07-26 23:17:46 +01:00
parent 810e884dbe
commit ded1bc14df
2 changed files with 19 additions and 12 deletions

View File

@@ -9,7 +9,12 @@ function! ale_linters#ruby#brakeman#Handle(buffer, lines) abort
return []
endif
let l:result = json_decode(join(a:lines, ''))
try
let l:result = json_decode(join(a:lines, ''))
catch /E474/
" Ignore invalid JSON
return []
endtry
let l:output = []