Eclipse Checkstyle Tutorial
Eclipse Checkstyle Tutorial explains step by step details of installing and configuring Checkstyle plugin with eclipse.
What is Checkstyle?
How to configure Checkstyle plugin with eclipse?
Checkstyle is a free source code analysis tool helps to improve your code quality by checking with certain pre-configured standards.
Checkstyle is also available as a command line tool. If you have a different IDE other than Eclipse, plug-ins available for Netbeans, IntelliJ IDEA & etc.
You need to download
You can install the Checkstyle Eclipse plugin using Eclipse update manager from the following links
For Installing Checkstyle Plugin from eclipse, select Help->Install New Software Then click add, then provide Name and Location according to the following screenshot
Then select the Checkstyle version click next and accept the license details, it will install the Checkstyle
After install, you can configure Checkstyle from eclipse, Window->Preferences->Java->Checkstyle
Using Checkstyle Plugin
You need to create a java project and add some class into src
Now, Build the project using Project->Build Project. Right click on the project, and run the Checkstyle according to following screenshot.
Now you can see a bug mark on the source code, Checkstyle violations will be shown ( You can also navigate to Window->Show View->Other->Checkstyle->Checkstyle violations).
From Checkstyle violations tab, You can get more detailed description about this bug(See the below screenshot).