summaryrefslogtreecommitdiff
path: root/ale_linters
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-07-26 23:17:46 +0100
committerw0rp <devw0rp@gmail.com>2017-07-26 23:17:46 +0100
commitded1bc14df6ddacd373cf9fe635f8489b9fb4f69 (patch)
tree0f979b4046b34b05f894af131fc49fa4fb98cef3 /ale_linters
parent810e884dbe18adbe355e4c88d30f40547433dec5 (diff)
downloadale-ded1bc14df6ddacd373cf9fe635f8489b9fb4f69.zip
#810 Ignore output which isn't JSON for brakeman
Diffstat (limited to 'ale_linters')
-rw-r--r--ale_linters/ruby/brakeman.vim7
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 = []