Introduction
Checkstyle is a development tool written by Oliver Burn to help you
ensure that your Java code adheres to a set of coding standards.
Checkstyle does this by inspecting your Java source code and pointing
out items that deviate from a defined set of coding rules. The full
Checkstyle distribution is included with the plug-in. In addition to
using the Eclipse Checkstyle plug-in you can also use Checkstyle from
the command line or as part of an Ant build.
With the Checkstyle Eclipse plug-in your code is constantly inspected
for problems. Within the Eclipse workbench you are notified of
problems via the task window and source code markers just as you
would see with compiler errors or warnings. The current release of
the Eclipse plug-in runs the tree-walker checks from Checkstyle.
These checks only check individual Java source files. A future
release of the plug-in may include Checkstyle checks that span across
multiple files.
Download & Installation
The Checkstyle Eclipse plug-in can be downloaded from the SourceForge
project page. The download package consists of a single zip file
that contains both the Checkstyle plug-in and the Checkstyle core
engine.
Once you have downloaded the distribution zip file extract its
contents. Copy the com.atlassw.tools.eclipse.checkstyle_<version> folder to your
Eclipse plug-in folder and restart Eclipse. That's all there is to
it, you are now ready to run Checkstyle.
Important Note: Eclipse
2.0.x is no longer supported as of plug-in release 3.4.0.
Important Note: If you
had a pre 3.1.0 version of the Eclipse Checkstyle plug-in installed
you will need to remove it before installing the new plug-in. Also,
remove any .checkstyle files from the root of your projects, these
files are not compatible with this version of the plug-in. After
removing these files be sure and refresh your workspace so that
Eclipse is aware that they have been removed.
What Next?
See the on-line help within Eclipse for more information on how to
configure and use Checkstyle. To get to the on-line help go the Help menu and select Help
Contents. Within the help window select the Checkstyle
topic in the left column.
|