Eclipse Checkstyle Plugin

Checkstyle integration into the Eclipse IDE. Coding standards made easy.

Install 1 Download 2 Code

1 Install via Eclipse Marketplace. Drag and drop this link into a running Eclipse Indigo/Juno/Kepler/Luna/Mars/Neon workspace
2 Latest release 7.6.0, based on Checkstyle 7.6, see release notes

What is it?

The Eclipse Checkstyle Plugin (aka eclipse-cs) integrates the static source code analyzer Checkstyle into the Eclipse IDE.
Checkstyle is a Open Source development tool to help you ensure that your Java code adheres to a set of coding standards. Checkstyle does this by inspecting your Java source code and pointing out items that deviate from a defined set of coding rules.

What does it do?

With the Checkstyle Eclipse Plugin your code is constantly inspected for coding standard deviations. Within the Eclipse workbench you are immediately notified of problems via the Eclipse Problems View and source code annotations similar to compiler errors or warnings.
This ensures an extremely short feedback loop right at the developers fingertips.

Why would I use it?

If your development team consists of more than one person, then obviously a common ground for coding standards (formatting rules, line lengths etc.) must be agreed upon - even if it is just for practical reasons to avoid superficial, format related merge conflicts.
Checkstyle (and the Eclipse Checkstyle Plugin for that matter) helps you define and easily apply those common rules.


{{slide.text}}

Basic concepts

The plugin uses a project builder to check your project files with Checkstyle. Assuming the Eclipse Auto-Build feature is enabled each modification of a project file will immediately get checked by Checkstyle on file save - giving you immediate feedback about the changes you made. To use a simple analogy, the Checkstyle Plug-in works very much like a compiler but instead of producing .class files it produces warnings where your code violates the Checkstyle rules. The discovered deviations are accessible in the Eclipse Problems View, as code editor annotations and via additional Checkstyle violations views.
Learn here how to activate Checkstyle for a project.

The set of rules used to check your code is highly configurable. A Checkstyle configuration specifies which check rules are validated against your code and with which severity violations will be reported. Once defined a Checkstyle configuration can be used across multiple projects. The plugin comes with several pre-defined Checkstyle configurations.
You can create custom configurations using the plugin's Checkstyle configuration editor or even use an existing Checkstyle configuration file from an external location.
A short introduction into creating your own Checkstyle configurations can be found here.


More Checkstyle?

For more Checkstyle goodness check out the sevntu-checkstyle project, where Roman Ivanov and his team from the Sevastopol National Technical University, Crimea are assembling a heap of additional Checkstyle checks.
These checks directly integrate with the eclipse-cs plug-in and can be installed from the following update site:

http://sevntu-checkstyle.github.com/sevntu.checkstyle/update-site/

Developers/Contributors/Supporters

Lars Ködderitzsch

Lars Ködderitzsch

Developer, project admin, project website

Lars is a freelance software developer and architect specialized in Java Enterprise application development, operating in the Cologne area, Germany.

Lars Ködderitzsch View Lars Ködderitzsch's profile on LinkedIn

Retired members/contributors
  • David Schneider - Project founder
  • Fabrice Bellingard - Checkstyle statistics plugin, French Translations
  • Nicolas De Loof - Maven integration
  • Levon Saldamli - Quickfixes
  • Rick Giles - Developer
  • Nikolay Metchev - Developer
Corporate sponsors

The nice folks at those companies have provided complimentary licenses of their commercial products for Open Source development purposes.

ej-technologies' JProfiler oXygen xml editor

Build it yourself

Git repository URL: git://git.code.sf.net/p/eclipse-cs/git

Clone the git repository (or create a fork @Sourceforge) and import all projects into your Eclipse workspace.

To build an update site bundle package you will require Apache Maven (3.2.x should do fine).
Open a command line in project net.sf.eclipsecs.parent and invoke mvn clean install.

Find the installable bundle in net.sf.eclipsecs-updatesite/target.