From ded1bc14df6ddacd373cf9fe635f8489b9fb4f69 Mon Sep 17 00:00:00 2001 From: w0rp Date: Wed, 26 Jul 2017 23:17:46 +0100 Subject: #810 Ignore output which isn't JSON for brakeman --- ale_linters/ruby/brakeman.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ale_linters') 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 = [] -- cgit v1.2.3