summaryrefslogtreecommitdiff
path: root/ale_linters/haskell
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-07-27 00:45:25 +0100
committerw0rp <devw0rp@gmail.com>2017-07-27 00:45:25 +0100
commitfa33faad9ed6da220394bd2abec2e1bdcd19edba (patch)
tree288fa6a1f8d2231d3e7b3b8e2915730906d6920e /ale_linters/haskell
parentdb4d68eae75c071b2a6521fe8587102f5b781efe (diff)
downloadale-fa33faad9ed6da220394bd2abec2e1bdcd19edba.zip
#810 - Handle output which is not JSON in many linters
Diffstat (limited to 'ale_linters/haskell')
-rw-r--r--ale_linters/haskell/hlint.vim8
1 files changed, 1 insertions, 7 deletions
diff --git a/ale_linters/haskell/hlint.vim b/ale_linters/haskell/hlint.vim
index accae374..91e65123 100644
--- a/ale_linters/haskell/hlint.vim
+++ b/ale_linters/haskell/hlint.vim
@@ -2,15 +2,9 @@
" Description: hlint for Haskell files
function! ale_linters#haskell#hlint#Handle(buffer, lines) abort
- if empty(a:lines)
- return []
- endif
-
- let l:errors = json_decode(join(a:lines, ''))
-
let l:output = []
- for l:error in l:errors
+ for l:error in ale#util#FuzzyJSONDecode(a:lines, [])
if l:error.severity ==# 'Error'
let l:type = 'E'
elseif l:error.severity ==# 'Suggestion'