diff --git a/autoload/syntastic/postprocess.vim b/autoload/syntastic/postprocess.vim
index 188a28a4..53e52dfd 100644
--- a/autoload/syntastic/postprocess.vim
+++ b/autoload/syntastic/postprocess.vim
@@ -53,6 +53,22 @@ function! syntastic#postprocess#cygwinRemoveCR(errors)
return llist
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
unlet s:save_cpo
" vim: set et sts=4 sw=4:
diff --git a/syntax_checkers/java/checkstyle.vim b/syntax_checkers/java/checkstyle.vim
index da32c65c..bb136f1d 100644
--- a/syntax_checkers/java/checkstyle.vim
+++ b/syntax_checkers/java/checkstyle.vim
@@ -38,20 +38,26 @@ function! SyntaxCheckers_java_checkstyle_GetLocList()
let makeprg = syntastic#makeprg#build({
\ 'exe': 'java',
\ '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,
\ 'filetype': 'java',
\ 'subchecker': 'checkstyle' })
let errorformat =
- \ '%f:%l:%c:\ %m,' .
- \ '%f:%l:\ %m'
+ \ '%P,' .
+ \ '%Q,' .
+ \ '%E,' .
+ \ '%E,' .
+ \ '%E,' .
+ \ '%E,' .
+ \ '%-G%.%#'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'subtype': 'Style',
- \ 'postprocess': ['cygwinRemoveCR'] })
+ \ 'postprocess': ['cygwinRemoveCR', 'decodeXMLEntities'] })
endfunction