Wednesday, 28 March 2018

Checkstyle in eclipse tutorial

In this post, you are going to learn
a.   What is Checkstyle
b.   How to install checkstyle eclipse plugin
c.   How to check the code with Checkstyle
d.   How to open Checkstyle violations window?
e.   How to open Checkstyle violations chart?

What is Checkstyle
Checkstyle is an open source code analysis tool, it helps java programmers to write code as per standards.

You can go through below link, to explore all the checks performed by checkstyle.

How to install Checkstyle eclipse plugin?
Open Eclipse.

Help -> Install new Software.

Work with below url.


Press the button Next. Follow the steps in the user interfae and
Install Check style plugin.

Restart the eclipse.

How to check the code with Checkstyle?
Right click on the project -> Checkstyle -> Check Code with Checkstyle


Now you can see all the violatons of the code in ‘Checkstyle Violations’ window.

How to open Checkstyle violations window?
Window -> Show view -> Other

Search for checkstyle.
Select ‘Checkstyle violations’ and press OK.

Now you can see all the violations in ‘Checkstyle Violations’ window.

How to open Checkstyle violations chart?
You can see all the cheskstyle violation in graphical view using ‘Checkstyle violations chart.

Window -> Show View -> Other

Search for checkstyle.
Select ‘Checkstyle violations chart’ and press OK button.

Now you can able to see the below kind of graph.


You may like


Previous                                                    Next                                                    Home

No comments:

Post a Comment