Errorformat adjustments for podchecker.
Deal with error messages like this: *** ERROR: =over on line 7 without closing =back at line EOF in file ...
This commit is contained in:
parent
f4ccd312ee
commit
9f7d5d7447
@ -26,11 +26,22 @@ function! SyntaxCheckers_pod_podchecker_GetLocList()
|
|||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%W%[%#]%[%#]%[%#] WARNING: %m at line %l in file %f,' .
|
\ '%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,
|
\ 'makeprg': makeprg,
|
||||||
\ 'errorformat': errorformat })
|
\ '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\<line \zs\d\+\ze'))
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
|
||||||
|
return loclist
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||||
|
Loading…
Reference in New Issue
Block a user