Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

(v3.7.0) Java: checkstyle

LCD 47 edited this page Oct 6, 2015 · 1 revision

Maintainer: Dmitry Geurkov d.geurkov@gmail.com

Checkstyle is a style checker for Java. See the project's page for details.

Checker options

g:syntastic_java_checkstyle_classpath (string; default: `checkstyle-6.10.1-all.jar`)
CLASSPATH to use. Allows for multiple files.
g:syntastic_java_checkstyle_conf_file (string; default: `sun_checks.xml`)
path to the configuration file for the -c option.

Notes

  1. The checker was tested with checkstyle version 5.5. If you're using it with version 5.6 or later you should remove DoubleCheckedLocking from your configuration file.
  2. At the time of this writing, the checkstyle checker doesn't distinguish between error severity levels. All messages are treated as errors, regardless of their severity defined in the checkstyle config file.
  3. Add let g:syntastic_java_checkstyle_post_args = ['-p', 'path/to/checkstyle.properties'] to your configuration if you need to use a property file.
  4. You probably want to download the "fat jar" checkstyle-*-all.jar and point g:syntastic_java_checkstyle_classpath to it. Current builds at Maven Central do not package checkstyles with its dependencies. g:syntastic_java_checkstyle_classpath accepts multiple files if you want to include the checkstyle jar and all of its dependencies.
Clone this wiki locally