From 98c8a0db55496e84aa8af901db50fa952e9b1ec4 Mon Sep 17 00:00:00 2001
From: Oliver Burn
The command line usage is:
- java com.puppycrawl.tools.checkstyle.Main \
+ java -D<property>=<value> \
+ com.puppycrawl.tools.checkstyle.Main \
[-f <format>] [-p <propertiesFile>] [-o <file>] [-r <dir>] file...
@@ -35,11 +36,19 @@ This command line tool is included in the checkstyle distribution.
The default behaviour of checkstyle can be changed either by setting system
+properties using the -D<property>=<value> arguments
+to java or by specifying a property file using the -p option.
+See here for all available configuration options.
+If a property file is specified the system properties are ignored. The
+following table describes what properties can be set:
Run checkstyle on a file
@@ -58,12 +67,24 @@ This command line tool is included in the checkstyle distribution. -p myCheckstyle.properties Check.java -Run checkstyle on a file and output to a file in XML format
+Run checkstyle on a file and output to a file in XML format with Australian localisation
- java com.puppycrawl.tools.checkstyle.Main \
+ java -Dcheckstyle.allow.tabs=yes \
+ -Dcheckstyle.locale.language=en \
+ -Dcheckstyle.locale.language=au \
+ com.puppycrawl.tools.checkstyle.Main \
-f xml -o build/checkstyle_errors.xml Check.java
+Run checkstyle on a file and disable pattern matching
++ java -Dcheckstyle.pattern.parameter=. \ + -Dcheckstyle.pattern.static=. \ + -Dcheckstyle.pattern.const=. \ + -Dcheckstyle.pattern.member=. \ + com.puppycrawl.tools.checkstyle.Main Check.java ++
It is possible to run Checkstyle directly from the JAR file using the -jar option. Example would be: