Skip to main content

Posts

Showing posts with the label Jenkins : Using Checkstyle plugin

JENKINS : CONTINUOUS INSPECTION USING CHECK STYLE

Check style is a code static analysis tool to help programmers to write java code and to evaluate coding standard such as > Avoid multiple blank lines > Removing unused variables > Enforcing correct indentations etc Assume we have configured a maven-project to build our code.Along with this we will include checkstyle for continuous inspection. First we have to install checkstyle plugin.From Manage Jenkins > Manage plugins. Now select checkstyle plugin and install it. Now go to our project maven-new. Under build action, along with clean package we will include checkstyle:checkstyle. Under post build step select publish checklist analytic result and leave the blank space, then the default **/checkstyle-result.xml is used.Then click save.  Now build our project.We can see a new checkstyle warning tab came on left. Now under warnings we can see many warnings.we have to fix this.  Under categories we can see various warnings.First we will ...