diff --git a/doc/syntastic-checkers.txt b/doc/syntastic-checkers.txt index 7453201e..00e0ccd9 100644 --- a/doc/syntastic-checkers.txt +++ b/doc/syntastic-checkers.txt @@ -2749,6 +2749,8 @@ details: http://community.haskell.org/~ndm/hlint/ +Syntastic requires "hlint" version 1.9.4 or later. + Checker options~ This checker is initialised using the "makeprgBuild()" function and thus it diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index ad7358b5..2af130b6 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -19,7 +19,7 @@ if has('reltime') lockvar! g:_SYNTASTIC_START endif -let g:_SYNTASTIC_VERSION = '3.9.0-32' +let g:_SYNTASTIC_VERSION = '3.9.0-33' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 diff --git a/syntax_checkers/haskell/hlint.vim b/syntax_checkers/haskell/hlint.vim index ff8c243b..07ac45d9 100644 --- a/syntax_checkers/haskell/hlint.vim +++ b/syntax_checkers/haskell/hlint.vim @@ -13,9 +13,17 @@ let g:loaded_syntastic_haskell_hlint_checker = 1 let s:save_cpo = &cpo set cpo&vim +function! SyntaxCheckers_haskell_hlint_IsAvailable() dict + if !executable(self.getExec()) + return 0 + endif + return syntastic#util#versionIsAtLeast(self.getVersion(), [1, 9, 4]) +endfunction + function! SyntaxCheckers_haskell_hlint_GetLocList() dict let buf = bufnr('') let makeprg = self.makeprgBuild({ + \ 'args_before': '--color=never', \ 'fname': syntastic#util#shescape(fnamemodify(bufname(buf), ':p')) }) let errorformat =