diff options
author | w0rp <devw0rp@gmail.com> | 2017-07-26 23:17:46 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-07-26 23:17:46 +0100 |
commit | ded1bc14df6ddacd373cf9fe635f8489b9fb4f69 (patch) | |
tree | 0f979b4046b34b05f894af131fc49fa4fb98cef3 /ale_linters | |
parent | 810e884dbe18adbe355e4c88d30f40547433dec5 (diff) | |
download | ale-ded1bc14df6ddacd373cf9fe635f8489b9fb4f69.zip |
#810 Ignore output which isn't JSON for brakeman
Diffstat (limited to 'ale_linters')
-rw-r--r-- | ale_linters/ruby/brakeman.vim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ale_linters/ruby/brakeman.vim b/ale_linters/ruby/brakeman.vim index 269c18f0..565c8c70 100644 --- a/ale_linters/ruby/brakeman.vim +++ b/ale_linters/ruby/brakeman.vim @@ -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 = [] |