Checkstyle Home Page
Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. It automates the process of checking Java code to spare humans of this boring (but important) task. This makes it ideal for projects that want to enforce a coding standard.
By default it supports the Sun Code Conventions. However, Checkstyle is highly configurable.
The things that Checkstyle can check for are:
The latest release of Checkstyle can be downloaded from the SourceForge download page.
If you want to live on the bleeding edge, you can checkout the current development code from CVS and compile yourself.
Upgrading to release 2.4
As of release 2.4 Checkstyle can only be configured by properties. The major impact is to the ANT task as many arguments have been removed. It is still possible to customise Checkstyle via ANT task, but the technique has changed. For example the following call with Checkstyle 2.3:
<checkstyle cacheFile="target/checkstyle.cache" headerFile="dev/header.txt" properties="dev/checkstyle.config"> <fileset dir="src" includes="**/*.java"/> </checkstyle>
has the equivalent call with Checkstyle 2.4:
<checkstyle properties="dev/checkstyle.config"> <fileset dir="src" includes="**/*.java"/> <property key="checkstyle.cache.file" file="target/checkstyle.cache"/> <property key="checkstyle.header.file" file="dev/header.txt"/> </checkstyle>
See the documentation for the ANT Task for more examples.
Checkstyle is most useful if you integrate it in your build process or your development environment. The distribution includes:
Copyright © 2001 Oliver Burn. All rights Reserved.