syntastic/syntax_checkers/haskell/hlint.vim

30 lines
908 B
VimL
Raw Normal View History

2013-07-29 07:52:22 -04:00
"============================================================================
"File: hlint.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Nicolas Wu <nicolas.wu at gmail dot com>
"License: BSD
"============================================================================
if exists('g:loaded_syntastic_haskell_hlint_checker')
2013-07-29 07:52:22 -04:00
finish
endif
let g:loaded_syntastic_haskell_hlint_checker = 1
2013-07-29 07:52:22 -04:00
function! SyntaxCheckers_haskell_hlint_GetLocList() dict
let makeprg = self.makeprgBuild({})
2013-07-29 07:52:22 -04:00
let errorformat =
\ '%E%f:%l:%c: Error: %m,' .
\ '%W%f:%l:%c: Warning: %m,' .
\ '%C%m'
return SyntasticMake({
2013-07-29 07:52:22 -04:00
\ 'makeprg': makeprg,
2013-07-29 11:14:36 -04:00
\ 'errorformat': errorformat,
\ 'postprocess': ['compressWhitespace'] })
2013-07-29 07:52:22 -04:00
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'haskell',
\ 'name': 'hlint'})