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
|
|
|
|
"============================================================================
|
|
|
|
|
2013-08-12 15:46:20 -04:00
|
|
|
if exists('g:loaded_syntastic_haskell_hlint_checker')
|
2013-07-29 07:52:22 -04:00
|
|
|
finish
|
|
|
|
endif
|
2013-08-12 15:46:20 -04:00
|
|
|
let g:loaded_syntastic_haskell_hlint_checker = 1
|
2013-07-29 07:52:22 -04:00
|
|
|
|
2014-01-03 04:29:08 -05:00
|
|
|
let s:save_cpo = &cpo
|
|
|
|
set cpo&vim
|
|
|
|
|
2013-10-28 07:53:33 -04:00
|
|
|
function! SyntaxCheckers_haskell_hlint_GetLocList() dict
|
2013-11-01 05:51:47 -04:00
|
|
|
let makeprg = self.makeprgBuild({})
|
2013-07-29 07:52:22 -04:00
|
|
|
|
2013-08-12 15:46:20 -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'})
|
2014-01-03 04:29:08 -05:00
|
|
|
|
|
|
|
let &cpo = s:save_cpo
|
|
|
|
unlet s:save_cpo
|
|
|
|
|
|
|
|
" vim: set et sts=4 sw=4:
|