diff --git a/docs/anttask.html b/docs/anttask.html index 3367cffe2..fc5507af3 100644 --- a/docs/anttask.html +++ b/docs/anttask.html @@ -1,16 +1,19 @@ - - - + + +
This task runs Checkstyle over specified Java files. The task has been tested using ANT 1.4.1. The latest version of checkstyle can be found at http://checkstyle.sourceforge.net/. +
This task runs Checkstyle over specified Java files. The task has been tested using ANT 1.5. +The latest version of checkstyle can be found at http://checkstyle.sourceforge.net/. This task is included in the checkstyle distribution.
| Attribute | -Description | -Required | +Attribute | +Description | +Required |
| file | -File to run checkstyle on. | -One of either file or at least one nested fileset element | +file | +File to run checkstyle on. | +One of either file or at least one nested fileset element |
| properties | -- Specifies a properties file that contains the configuration options. - See here for all available configuration - options. Use the nested <property> - element to override properties in the file. This is very useful with - project specific properties like - reporting configuration. + | config | +Specifies a file that defines the configuration modules. + See here for a descrition of how to define a configuration. | +Yes | +|
| properties | ++ Specifies a file that contains properties for + expanded property values of the configuration. | -No | +No | +||
| packageNamesFile | ++ Specifies a file that contains + package names for the configuration. + | +No | +|||
| failOnViolation | +Specifies whether the build will continue even if there are violations. + Defaults to "true". | +No | |||
| failOnViolation | -Specifies whether the build will continue even if there are violations. Defaults to "true". | -No | +failureProperty | +The name of a property to set in the event of a violation. | +No |
| failureProperty | -The name of a property to set in the event of a violation. | -No | -|||
| classpath | -The classpath to use when looking up classes. Defaults to the current classpath. | -No | +classpath | +The classpath to use when looking up classes. Defaults to the current classpath. | +No |
| Attribute | -Description | -Required | +Attribute | +Description | +Required |
| type | -+ | type | +
The type of output to generate. The valid values are:
Defaults to "plain". |
- No | +No |
| toFile | -The file to write output to. Defaults to standard output. Note, there is no way to explicitly specify standard output. + | toFile | +The file to write output to. Defaults to standard output. Note, there is no way to explicitly specify standard output. | -No | +No |
The parameters for the <property> element are:
+A <property> element provides a property for +expanded property values of the configuration. +The parameters for the <property> element are:
| Attribute | -Description | -Required | +Attribute | +Description | +Required |
| key | -The key for the property. |
- Yes | +key | +The key for the property. |
+ Yes |
| value | -The value of the property specified as a string. | -Either value or file | +value | +The value of the property specified as a string. | +Either value or file |
| file | -The value of the property specified as a file. This is + | file | +The value of the property specified as a file. This is great for specifying file names relative to the ANT build file. | -Either value or file | +Either value or file |
Run checkstyle on a single file
+Run checkstyle with configuration file docs/checkstyle_checks.xml on a single file
- <checkstyle file="Check.java"/> + <checkstyle config="docs/checkstyle_checks.xml" file="Check.java"/>-
Run checkstyle on a set of Java files using Site-wide Checkstyle rules and overriding properties
+Run checkstyle on a set of Java files using site-wide configuration and +an expanded property value
- <checkstyle properties="/path/to/site/checkstyle.rules">
+ <checkstyle config="/path/to/site/checkstyle_checks.xml">
<fileset dir="src/checkstyle" includes="**/*.java"/>
<!-- Location of cache-file. Something that is project specific -->
<property key="checkstyle.cache.file" file="target/cachefile"/>
-
- <!-- This project allows tabs (big mistake:-) -->
- <property key="checkstyle.allow.tabs" value="true"/>
</checkstyle>
Run checkstyle on a set of files and output messages to standard output in plain format, and a file in XML format
- <checkstyle>
+ <checkstyle config="docs/checkstyle_checks.xml">
<fileset dir="src/checkstyle" includes="**/*.java"/>
<formatter type="plain"/>
<formatter type="xml" toFile="build/checkstyle_errors.xml"/>
</checkstyle>
-
+
+Run checkstyle with configuration file docs/checkstyle_checks.xml on a file and
+provide a package names file
+
+ <checkstyle config="docs/checkstyle_checks.xml" + packageNamesFile="myPackageNames.xml" + file="Check.java"/> ++
Run checkstyle in an automated build and send an email report if style violations are detected
<target name="checkstyle"
description="Generates a report of code convention violations.">
- <checkstyle failureProperty="checkstyle.failure"
+ <checkstyle config="docs/checkstyle_checks.xml"
+ failureProperty="checkstyle.failure"
failOnViolation="false">
<formatter type="xml" tofile="checkstyle_report.xml"/>
<fileset dir="src" includes="**/*.java"/>
@@ -203,7 +225,7 @@ This task is included in the checkstyle distribution.
</target>
-Copyright © 2001 Oliver Burn. All rights Reserved.
+Copyright © 2002 Oliver Burn. All rights Reserved.
diff --git a/docs/mystyle.css b/docs/mystyle.css index 624ef61bd..e68a747ad 100644 --- a/docs/mystyle.css +++ b/docs/mystyle.css @@ -16,6 +16,14 @@ h4.tip { text-align: center; } +td { + vertical-align:top; +} + +td.required { + text-align: center; +} + tr.header { background-color: Silver; color:Black;