Merge pull request #53 from dahlia/haskell-stack
GHC Linter for Haskell Stack
This commit is contained in:
commit
c5d3cc5bc7
@ -22,11 +22,16 @@ function! ale_linters#haskell#ghc#Handle(buffer, lines)
|
||||
for line in a:lines
|
||||
if len(matchlist(line, pattern)) > 0
|
||||
call add(corrected_lines, line)
|
||||
if line !~ ': error:$'
|
||||
call add(corrected_lines, '')
|
||||
endif
|
||||
elseif line == ''
|
||||
call add(corrected_lines, line)
|
||||
else
|
||||
if len(corrected_lines) > 0
|
||||
if corrected_lines[-1] =~ ': error:$'
|
||||
let line = substitute(line, '\v^\s+', ' ', '')
|
||||
endif
|
||||
let corrected_lines[-1] .= line
|
||||
endif
|
||||
endif
|
||||
@ -60,3 +65,11 @@ call ALEAddLinter('haskell', {
|
||||
\ 'command': g:ale#util#stdin_wrapper . ' .hs ghc -fno-code -v0',
|
||||
\ 'callback': 'ale_linters#haskell#ghc#Handle',
|
||||
\})
|
||||
|
||||
call ALEAddLinter('haskell', {
|
||||
\ 'name': 'stack-ghc',
|
||||
\ 'output_stream': 'stderr',
|
||||
\ 'executable': 'stack',
|
||||
\ 'command': g:ale#util#stdin_wrapper . ' .hs stack ghc -- -fno-code -v0',
|
||||
\ 'callback': 'ale_linters#haskell#ghc#Handle',
|
||||
\})
|
||||
|
Loading…
Reference in New Issue
Block a user