#810 - Handle output which is not JSON in many linters
This commit is contained in:
@@ -5,17 +5,11 @@ let g:ale_ruby_rails_best_practices_options =
|
||||
\ get(g:, 'ale_ruby_rails_best_practices_options', '')
|
||||
|
||||
function! ale_linters#ruby#rails_best_practices#Handle(buffer, lines) abort
|
||||
if len(a:lines) == 0
|
||||
return []
|
||||
endif
|
||||
|
||||
let l:result = json_decode(join(a:lines, ''))
|
||||
|
||||
let l:output = []
|
||||
|
||||
for l:warning in l:result
|
||||
for l:warning in ale#util#FuzzyJSONDecode(a:lines, [])
|
||||
if !ale#path#IsBufferPath(a:buffer, l:warning.filename)
|
||||
continue
|
||||
continue
|
||||
endif
|
||||
|
||||
call add(l:output, {
|
||||
|
||||
Reference in New Issue
Block a user