OClint: fix parsing.
This commit is contained in:
parent
f62e0f6618
commit
1fac6011ef
@ -19,7 +19,7 @@ if has('reltime')
|
||||
lockvar! g:syntastic_start
|
||||
endif
|
||||
|
||||
let g:syntastic_version = '3.4.0-117'
|
||||
let g:syntastic_version = '3.4.0-120'
|
||||
lockvar g:syntastic_version
|
||||
|
||||
" Sanity checks {{{1
|
||||
|
@ -33,12 +33,10 @@ function! SyntaxCheckers_c_oclint_GetLocList() dict
|
||||
\ 'post_args_before': '-- -c ' . syntastic#c#ReadConfig(g:syntastic_oclint_config_file) })
|
||||
|
||||
let errorformat =
|
||||
\ '%E%f:%l:%c: %m P1 ,' .
|
||||
\ '%E%f:%l:%c: %m P2 ,' .
|
||||
\ '%W%f:%l:%c: %m P3 ,' .
|
||||
\ '%E%f:%l:%c: fatal error: %m,' .
|
||||
\ '%E%f:%l:%c: error: %m,' .
|
||||
\ '%W%f:%l:%c: warning: %m,' .
|
||||
\ '%E%f:%l:%c: %m,' .
|
||||
\ '%-G%.%#'
|
||||
|
||||
let loclist = SyntasticMake({
|
||||
@ -48,6 +46,15 @@ function! SyntaxCheckers_c_oclint_GetLocList() dict
|
||||
\ 'postprocess': ['compressWhitespace'],
|
||||
\ 'returns': [0, 3, 5] })
|
||||
|
||||
for e in loclist
|
||||
if e['text'] =~# '\v P3( |$)'
|
||||
let e['type'] = 'W'
|
||||
endif
|
||||
|
||||
let e['text'] = substitute(e['text'], '\m P[1-3]$', '', '')
|
||||
let e['text'] = substitute(e['text'], ' P[1-3] ', ': ', '')
|
||||
endfor
|
||||
|
||||
call self.setWantSort(1)
|
||||
|
||||
return loclist
|
||||
|
Loading…
x
Reference in New Issue
Block a user