From 62fde005168d660a4f0f2dcef3caa63c992aad1d Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Thu, 10 Apr 2014 09:45:11 +0300 Subject: [PATCH] Hdevtools: fix column calculations. Cleanup. --- plugin/syntastic.vim | 2 +- syntax_checkers/haskell/hdevtools.vim | 29 ++++++++++++++++----------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 59b6f050..72e6359f 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -18,7 +18,7 @@ if has('reltime') let g:syntastic_start = reltime() endif -let g:syntastic_version = '3.4.0-22' +let g:syntastic_version = '3.4.0-23' " Sanity checks {{{1 diff --git a/syntax_checkers/haskell/hdevtools.vim b/syntax_checkers/haskell/hdevtools.vim index 7dde6381..81954916 100644 --- a/syntax_checkers/haskell/hdevtools.vim +++ b/syntax_checkers/haskell/hdevtools.vim @@ -19,23 +19,28 @@ let s:save_cpo = &cpo set cpo&vim function! SyntaxCheckers_haskell_hdevtools_GetLocList() dict - let makeprg = self.makeprgBuild({ - \ 'exe': self.getExecEscaped() . ' check', - \ 'fname': syntastic#util#shexpand('%:p'), - \ 'args': get(g:, 'hdevtools_options', '') }) + if exists('g:hdevtools_options') + let g:syntastic_haskell_hdevtools_args = g:hdevtools_options + endif - let errorformat= '\%-Z\ %#,'. - \ '%W%f:%l:%c:\ Warning:\ %m,'. - \ '%W%f:%l:%c:\ Warning:,'. - \ '%E%f:%l:%c:\ %m,'. - \ '%E%>%f:%l:%c:,'. - \ '%+C\ \ %#%m,'. - \ '%W%>%f:%l:%c:,'. - \ '%+C\ \ %#%tarning:\ %m,' + let makeprg = self.makeprgBuild({ + \ 'exe_after': 'check', + \ 'fname': syntastic#util#shexpand('%:p') }) + + let errorformat = + \ '%-Z %#,'. + \ '%W%f:%l:%v: Warning: %m,'. + \ '%W%f:%l:%v: Warning:,'. + \ '%E%f:%l:%v: %m,'. + \ '%E%>%f:%l:%v:,'. + \ '%+C %#%m,'. + \ '%W%>%f:%l:%v:,'. + \ '%+C %#%tarning: %m,' return SyntasticMake({ \ 'makeprg': makeprg, \ 'errorformat': errorformat, + \ 'defaults': {'vcol': 1}, \ 'postprocess': ['compressWhitespace'] }) endfunction