Merge pull request #221 from rob-b/improve-formatting-of-haskell-linters
Improve formatting of ghc and hlint haskell linters
This commit is contained in:
commit
4ad5c4757c
@ -29,9 +29,7 @@ function! ale_linters#haskell#ghc#Handle(buffer, lines)
|
|||||||
call add(l:corrected_lines, l:line)
|
call add(l:corrected_lines, l:line)
|
||||||
else
|
else
|
||||||
if len(l:corrected_lines) > 0
|
if len(l:corrected_lines) > 0
|
||||||
if l:corrected_lines[-1] =~# ': error:$'
|
let l:line = substitute(l:line, '\v\s+', ' ', '')
|
||||||
let l:line = substitute(l:line, '\v^\s+', ' ', '')
|
|
||||||
endif
|
|
||||||
let l:corrected_lines[-1] .= l:line
|
let l:corrected_lines[-1] .= l:line
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -13,7 +13,7 @@ function! ale_linters#haskell#hlint#Handle(buffer, lines)
|
|||||||
\ 'lnum': l:error.startLine + 0,
|
\ 'lnum': l:error.startLine + 0,
|
||||||
\ 'vcol': 0,
|
\ 'vcol': 0,
|
||||||
\ 'col': l:error.startColumn + 0,
|
\ 'col': l:error.startColumn + 0,
|
||||||
\ 'text': l:error.severity . ': ' . l:error.hint,
|
\ 'text': l:error.severity . ': ' . l:error.hint . '. Found: ' . l:error.from . ' Why not: ' . l:error.to,
|
||||||
\ 'type': l:error.severity ==# 'Error' ? 'E' : 'W',
|
\ 'type': l:error.severity ==# 'Error' ? 'E' : 'W',
|
||||||
\})
|
\})
|
||||||
endfor
|
endfor
|
||||||
|
Loading…
Reference in New Issue
Block a user