Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. It automates the process of checking Java code to spare humans of this boring (but important) task. This makes it ideal for projects that want to enforce a coding standard.
Checkstyle is highly configurable and can be made to support almost any coding standard. An example configuration files are supplied supporting the Sun Code Conventions, Google Java Style.
A good example of a report that can be produced using Checkstyle and Maven can be seen here.
As of September 2013, the Checkstyle project is using GitHub for hosting the following:
SourceForge will still be used for website hosting and binary hosting for downloads.
Releases will happen at the end of each month if functional changes exists in master branch of our repo.
Checkstyle can check many aspects of your source code. It can find class design problems, method design problems. It also has the ability to check code layout and formatting issues.
For a detailed list of available checks please refer to the Checks page.
The latest release of Checkstyle can be downloaded from the SourceForge download page, or Maven central.
If you want to live on the bleeding edge, you can checkout the current development code from GitHub and compile yourself.
Checkstyle is most useful if you integrate it in your build process or your development environment. The distribution includes:
Additionally plug-ins are written by third-parties. Some of them are still based on the Checkstyle 2.4 release, although there have been many improvements since then. The known plug-ins are:
IDE / Build tool | Main/Initial Author | Available from | Remarks |
---|---|---|---|
Bitbucket Server | Stephan Bechter | Checkstyles for Bitbucket Server | |
Codacy | João Machado | codacy-checkstyle | Provides analysis per commit and per pull request. Supports CheckStyle config files. |
Eclipse/RAD/RDz | David Schneider | Eclipse-CS Home Page | In 2007 was awarded Best Open Source Eclipse-based Developer tool . |
Gradle | Hans Dockter (initial author) | Checkstyle supported out of the box | Gradle Checkstyle docs |
IntelliJ IDEA | James Shiell | Checkstyle-idea Project Page | Provides real-time and on-demand scanning. |
jGRASP | Larry Barowski | jGRASP Home Page | |
Eclipse/RAD/RDz | Roman Ivanov | Project Page | Extension for Eclipse-CS plugin and also an incubator for Checkstyle checks that are not present in main stream of Checkstyle. See the Wiki and Blog . |
Bamboo Checkstyle plug-in | Atlassian (formerly by Ross Rowe and Stephan Paulicke) | Bamboo Checkstyle plug-in Home Page | An add-on that will parse and record CheckStyle reports and report your style violations over time. |
Code Climate | Sivakumar Kailasam | codeclimate-checkstyle | |
Jenkins Checkstyle plug-in | Jenkins Checkstyle plug-in Home Page | This plug-in is supported by the Static Analysis Collector plug-in that collects different analysis results and shows the results in aggregated trend graphs. | |
Maven | Vincent Massol | Checkstyle supported out of the box | example report |
tIDE | Built in | ||
NetBeans | Petr Hejl | Checkstyle Beans | Problems with source code are displayed as annotations of the source |
NetBeans | Software Quality Environment (SQE) | ||
SonarQube | Freddy Mallet (initial author) | SonarQube Home Page | Demo site |
jEdit | Todd Papaioannou | JEdit CheckStylePlugin | |
SCM-Manager | SCM-Manager Plugin Page | ||
IntelliJ IDEA | Jakub Slawinski | QAPlug | Provides quality assurance features. |
JArchitect | JArchitect Home Page | Imports XML result files from CheckStyle. | |
SBT | Andrew Johnson | sbt-checkstyle-plugin Project Page | SBT plugin for running Checkstyle on Java source files in an SBT project |
IDE / Build tool | Main/Initial Author | Available from | Remarks |
---|---|---|---|
IntelliJ IDEA | Mark Lussier | JetStyle Project Page | |
jCoderZ | fawkez-code-report | Combines multiple tools (CheckStyle, findbugs, PMD, Cobertura, etc.) | |
BlueJ | Rick Giles | bluejcheckstyle home page | |
Eclipse/RAD/RDz | Marco van Meegen | Checklipse Home Page | |
QALab | Benoit Xhenseval | QALab Home Page | Supports tracking Checkstyle statistics over time. |
NetBeans | Paul Goulbourn | nbCheckStyle | |
Emacs JDE | Markus Mohnen | Part of the standard JDEE distribution | |
Vim editor | Xandy Johnson | Plugin Homepage | Vim file-type plug-in |
If you have written a plugin for other IDEs, please let us know, so we can provide a link here.