From 9f7d5d74479743291e2fb225dfcfe8a89ebc80c7 Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Wed, 10 Jul 2013 14:29:24 +0300 Subject: [PATCH] Errorformat adjustments for podchecker. Deal with error messages like this: *** ERROR: =over on line 7 without closing =back at line EOF in file ... --- syntax_checkers/pod/podchecker.vim | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/syntax_checkers/pod/podchecker.vim b/syntax_checkers/pod/podchecker.vim index 4f215201..86b6dc07 100644 --- a/syntax_checkers/pod/podchecker.vim +++ b/syntax_checkers/pod/podchecker.vim @@ -26,11 +26,22 @@ function! SyntaxCheckers_pod_podchecker_GetLocList() let errorformat = \ '%W%[%#]%[%#]%[%#] WARNING: %m at line %l in file %f,' . - \ '%E%[%#]%[%#]%[%#] ERROR: %m at line %l in file %f' + \ '%W%[%#]%[%#]%[%#] WARNING: %m at line EOF in file %f,' . + \ '%E%[%#]%[%#]%[%#] ERROR: %m at line %l in file %f,' . + \ '%E%[%#]%[%#]%[%#] ERROR: %m at line EOF in file %f' - return SyntasticMake({ + let loclist = SyntasticMake({ \ 'makeprg': makeprg, \ 'errorformat': errorformat }) + + for n in range(len(loclist)) + let e = loclist[n] + if e['valid'] && e['lnum'] == 0 + let e['lnum'] = str2nr(matchstr(e['text'], '\m\