checkstyle.vim 790 B

123456789101112131415161718192021222324252627282930
  1. " Vim compiler file
  2. " Compiler: Checkstyle
  3. " Maintainer: Doug Kearns <dougkearns@gmail.com>
  4. " Last Change: 2020 Aug 2
  5. if exists("current_compiler")
  6. finish
  7. endif
  8. let current_compiler = "checkstyle"
  9. if exists(":CompilerSet") != 2 " older Vim always used :setlocal
  10. command -nargs=* CompilerSet setlocal <args>
  11. endif
  12. let s:cpo_save = &cpo
  13. set cpo&vim
  14. " CompilerSet makeprg=java\ com.puppycrawl.tools.checkstyle.Main\ -f\ plain\ -c\ /sun_checks.xml
  15. " CompilerSet makeprg=java\ -jar\ checkstyle-X.XX-all.jar\ -f\ plain\ -c\ /sun_checks.xml
  16. CompilerSet makeprg=checkstyle\ -f\ plain
  17. CompilerSet errorformat=[%tRROR]\ %f:%l:%v:\ %m,
  18. \[%tARN]\ %f:%l:%v:\ %m,
  19. \[%tRROR]\ %f:%l:\ %m,
  20. \[%tARN]\ %f:%l:\ %m,
  21. \%-G%.%#
  22. let &cpo = s:cpo_save
  23. unlet s:cpo_save