tumblr counter

Eclipse Checkstyle Tutorial

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.

Note

If you interested on PMD Eclipse Plugin (another source code analysis tool), You can follow PMD Eclipse Tutorial

If you interested on Findbugs Eclipse Plugin (another source code analysis tool), You can follow Findbugs Eclipse Tutorial

If you interested on Sonar Eclipse Plugin (another source code analysis tool), You can follow Eclipse Sonar Tutorial

Checkstyle Tutorial

You need to download

  1. Eclipse 3.7
  2. Checkstyle 5.6

You can install the Checkstyle Eclipse plugin using Eclipse update manager from the following links

  1. http://eclipse-cs.sourceforge.net/update

Checkstyle Installation

For Installing Checkstyle Plugin from eclipse, select Help->Install New Software Then click add, then provide Name and Location according to the following screenshot

Checkstyle Installation

Then select the Checkstyle version click next and accept the license details, it will install the Checkstyle

Checkstyle Configuration

After install, you can configure Checkstyle from eclipse, Window->Preferences->Java->Checkstyle

Checkstyle Configuration

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.

Running Checkstyle

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).

Checkstyle Vroperties





Eclipse Checkstyle Plugin Tutorial Installing And Configuring Checkstyle Plugin With Eclipse How To Find Checkstyle Violations Checkstyle Static Code Analysis Checkstyle Code Review Tool Checkstyle Code Coverage Tool Checkstyle Source Code Analysis Checkstyle Code Inspection

You might also like following tutorials :

Java Tutorial Apache CXF Tutorial Hibernate Tutorial Spring Tutorial Struts Tutorial
1 Comments on "Eclipse Checkstyle Tutorial"
20.01.2014 08:02:47 baskar
How to generate checkstyle violation report to an external file like pdf?  pls add that  section also?