The Checkstyle Plugin for Eclipse
Checkstyle is a static analysis tool. The Checkstyle plugin for Eclipse enables the use of Checkstyle from within Eclipse .
Installation
There are three different ways to install the Eclipse Checkstyle Plugin. They are described at the Checkstyle Plugin site . At the moment, the “Marketplace” seems to be the most reliable approach.
If none of the normal methods work, you may want to consider installing the plugin manually.
1)
Enabling the Checkstyle Plugin
To enable the Checkstyle plugin for a particular project:
Right-click on the project.
Click on Checkstyle and Activate Checkstyle. (Or, if there is no Checkstyle entry, click on Properties and then select “Checkstyle”, check “Checkstyle active…” and click on OK.)
Loading a Checks File (Configuration File)
You can set the checks file for all of the projects in a workspace or for each project individually.
If you have a different workspace for each course then you should probably use the first approach,
which is described in the page on installing Eclipse . If you use one workspace for all of your courses then you should probably use the second approach as follows:
Download the file to an appropriate location on your local file system.
In Eclipse, right-click on the project, and pull down to Properties.
Select “Checkstyle” and click on the “Local Check Configurations” tab.
Click on New.
Select “External Configuration File”, enter a “Name:” and the “Location:” of the file, and click OK.
Select the “Main” tab.
Select the appropriate configuration file from the drop-down list.
Click on OK.
When the “Rebuild suggested” dialog appears, click on Yes.