diff options
Diffstat (limited to 'runtime/compiler/checkstyle.vim')
-rw-r--r-- | runtime/compiler/checkstyle.vim | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/runtime/compiler/checkstyle.vim b/runtime/compiler/checkstyle.vim index ccab3c585d..4ebd9e15b5 100644 --- a/runtime/compiler/checkstyle.vim +++ b/runtime/compiler/checkstyle.vim @@ -1,7 +1,7 @@ " Vim compiler file " Compiler: Checkstyle " Maintainer: Doug Kearns <dougkearns@gmail.com> -" Last Change: 2013 Jun 26 +" Last Change: 2020 Aug 2 if exists("current_compiler") finish @@ -12,8 +12,18 @@ if exists(":CompilerSet") != 2 " older Vim always used :setlocal command -nargs=* CompilerSet setlocal <args> endif -CompilerSet makeprg=java\ com.puppycrawl.tools.checkstyle.Main\ -f\ plain +let s:cpo_save = &cpo +set cpo&vim -" sample error: WebTable.java:282: '+=' is not preceded with whitespace. -" WebTable.java:201:1: '{' should be on the previous line. -CompilerSet errorformat=%f:%l:%v:\ %m,%f:%l:\ %m,%-G%.%# +" CompilerSet makeprg=java\ com.puppycrawl.tools.checkstyle.Main\ -f\ plain\ -c\ /sun_checks.xml +" CompilerSet makeprg=java\ -jar\ checkstyle-X.XX-all.jar\ -f\ plain\ -c\ /sun_checks.xml + +CompilerSet makeprg=checkstyle\ -f\ plain +CompilerSet errorformat=[%tRROR]\ %f:%l:%v:\ %m, + \[%tARN]\ %f:%l:%v:\ %m, + \[%tRROR]\ %f:%l:\ %m, + \[%tARN]\ %f:%l:\ %m, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save |