Merge branch 'fix_checkstyle' into preprocess
This commit is contained in:
commit
9913819255
@ -53,6 +53,22 @@ function! syntastic#postprocess#cygwinRemoveCR(errors)
|
|||||||
return llist
|
return llist
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" decode XML entities
|
||||||
|
function! syntastic#postprocess#decodeXMLEntities(errors)
|
||||||
|
let llist = []
|
||||||
|
|
||||||
|
for e in a:errors
|
||||||
|
let e['text'] = substitute(e['text'], '<', '<', 'g')
|
||||||
|
let e['text'] = substitute(e['text'], '>', '>', 'g')
|
||||||
|
let e['text'] = substitute(e['text'], '"', '"', 'g')
|
||||||
|
let e['text'] = substitute(e['text'], ''', "'", 'g')
|
||||||
|
let e['text'] = substitute(e['text'], '&', '\&', 'g')
|
||||||
|
call add(llist, e)
|
||||||
|
endfor
|
||||||
|
|
||||||
|
return llist
|
||||||
|
endfunction
|
||||||
|
|
||||||
let &cpo = s:save_cpo
|
let &cpo = s:save_cpo
|
||||||
unlet s:save_cpo
|
unlet s:save_cpo
|
||||||
" vim: set et sts=4 sw=4:
|
" vim: set et sts=4 sw=4:
|
||||||
|
@ -38,20 +38,26 @@ function! SyntaxCheckers_java_checkstyle_GetLocList()
|
|||||||
let makeprg = syntastic#makeprg#build({
|
let makeprg = syntastic#makeprg#build({
|
||||||
\ 'exe': 'java',
|
\ 'exe': 'java',
|
||||||
\ 'args': '-cp ' . g:syntastic_java_checkstyle_classpath .
|
\ 'args': '-cp ' . g:syntastic_java_checkstyle_classpath .
|
||||||
\ ' com.puppycrawl.tools.checkstyle.Main -c ' . g:syntastic_java_checkstyle_conf_file,
|
\ ' com.puppycrawl.tools.checkstyle.Main -c ' . g:syntastic_java_checkstyle_conf_file .
|
||||||
|
\ ' -f xml',
|
||||||
\ 'fname': fname,
|
\ 'fname': fname,
|
||||||
\ 'filetype': 'java',
|
\ 'filetype': 'java',
|
||||||
\ 'subchecker': 'checkstyle' })
|
\ 'subchecker': 'checkstyle' })
|
||||||
|
|
||||||
let errorformat =
|
let errorformat =
|
||||||
\ '%f:%l:%c:\ %m,' .
|
\ '%P<file name="%f">,' .
|
||||||
\ '%f:%l:\ %m'
|
\ '%Q</file>,' .
|
||||||
|
\ '%E<error line="%l" column="%c" severity="%trror" message="%m" source="%.%#"/>,' .
|
||||||
|
\ '%E<error line="%l" severity="%trror" message="%m" source="%.%#"/>,' .
|
||||||
|
\ '%E<error line="%l" column="%c" severity="%tarning" message="%m" source="%.%#"/>,' .
|
||||||
|
\ '%E<error line="%l" severity="%tarning" message="%m" source="%.%#"/>,' .
|
||||||
|
\ '%-G%.%#'
|
||||||
|
|
||||||
return SyntasticMake({
|
return SyntasticMake({
|
||||||
\ 'makeprg': makeprg,
|
\ 'makeprg': makeprg,
|
||||||
\ 'errorformat': errorformat,
|
\ 'errorformat': errorformat,
|
||||||
\ 'subtype': 'Style',
|
\ 'subtype': 'Style',
|
||||||
\ 'postprocess': ['cygwinRemoveCR'] })
|
\ 'postprocess': ['cygwinRemoveCR', 'decodeXMLEntities'] })
|
||||||
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user