Movatterモバイル変換


[0]ホーム

URL:


Checkstyle


  • | Last Published: 2025-06-29
  • |Version: 10.26.1
  • toTop
GitHubTwitterStackoverflowGoogleGroupsJProfiler

Overview

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 andMaven can beseen here .

Features

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 theChecks page.

Download

The latest release of Checkstyle can be downloaded fromthe GitHub releases page, or Maven central.

If you want to live on the bleeding edge, you cancheckout the current development code from GitHub and compile yourself. Or usejitpack.io to build and get artifacts you need (you can even build your forked repo).

Previous Version Documentation

The current website contains the documentation for the latest release only. We only support this latest version.
You can find documentation for most old versions using a URL format like https://checkstyle.sourceforge.io/version/X.X where "X.X" is the version number.
Example: https://checkstyle.sourceforge.io/version/6.18 for version 6.18.

Development Cycle

Release:
  • happens at the end of each month if functional changes exist in the master branch of our repo
  • can happen by request by any user who is impacted, but it is not always guaranteed.

Checkstyle is following its own view of Hybrid Romantic and Semantic Versioning: This is in the form of "First.Second.Third"

First digit is representing Romantic version. When it is the only number increasing, the maintainers marked it as a noticeably large breaking compatibility or major conceptual change which occurred from their perspective.
Second digit is Semantic version which is a combination of major and minor. When it is the only number increasing, it means that either some breaking compatibility happened or new features/modules were introduced.
Third digit is Semantic version which is the patch version. When it is the only number increasing, it means that only defects are fixed.

Checkstyle is not usingSemantic Versioning due to the reason explained atissue #3709.

JRE and JDK

Runtime of Checkstyle is limited only by minimal version or JRE.

Checkstyle versionJRE version
10.x 11 and above
7.x, 8.x, 9.x 8 and above
6.x 6 and above
5.x 5 and above

Checkstyle currently is confirmed to be buildable by all JDKs from 11 through 17. Most recent JDKs may be supported. Pleasereport an issue if there are any problems with recent JDKs.

Supported Java Language Version

Checkstyle can parse all Java language features introduced inJava 22 and below. We may support preview features depending on community demand, but please note that support for a given preview feature may change at any time.

Pleasereport an issue if you encounter any issues with the support of the latest Java language features.

Limitations

Checkstyle is a single file static analysis tool, for more details please read the full list oflimitations.

Additional Checks

There are other projects that provide additional checks:

Project nameLinkRemarks
Checkstyle addons checkstyle-addonsProvides additional custom rules and enhancements for Checkstyle.
SevNTU checkstyle sevntu-checkstyleOffers a collection of advanced static analysis checks for Java code.
check-tfij-style check-tfij-styleProvides opinionated Checkstyle rules based on best practices.

Related Tools

Checkstyle is most useful if you integrate it into 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:

Active Tools

IDE / Build toolMain/Initial AuthorAvailable fromRemarks
CodacyJoão Machado codacy-checkstyle Provides analysis per commit and per pull request. Supports CheckStyle config files.
Eclipse/RAD/RDzChristian Wulf Lightweight Eclipse Plugin for Quality Assurance ToolsAlternative to the Eclipse-CS plugin. Allows to use custom checks directly without providing an Eclipse Fragment plugin for that purpose.
Eclipse/RAD/RDzDavid SchneiderEclipse-CS Home Page In 2007 was awarded Best Open Source Eclipse-based Developer tool.
GradleHans Dockter (initial author)Checkstyle supported out of the box Gradle Checkstyle docs
IntelliJ IDEAJames Shiell Checkstyle-idea Project PageProvides real-time and on-demand scanning.
jGRASPLarry BarowskijGRASP Home PageIntegrates Checkstyle for code analysis and displays results within the IDE.
Eclipse/RAD/RDzRoman IvanovProject Page Extension for Eclipse-CS plugin and also an incubator for Checkstyle checks that are not present in main stream of Checkstyle. See theWiki andBlog .
Eclipse/RAD/RDzJan BurkhardtProject Page Extension for Eclipse-CS plugin which ensures nullness annotations on methods and constructors (JSR305).
Bamboo Checkstyle plug-inAtlassian (formerly by Ross Rowe and Stephan Paulicke) Bamboo Checkstyle plug-in Home PageAn add-on that will parse and record CheckStyle reports and report your style violations over time.
Code ClimateSivakumar Kailasam codeclimate-checkstyleSupports Checkstyle configuration files and integrates with Code Climate's automated code review system.
Checkstyle GitHub ActionsNikita Savinov Github-action MarketplaceIt runs checkstyle on your Pull Requests usinggithub-actions andreviewdog
Jenkins Checkstyle plug-inJenkins CommunityJenkins Checkstyle plug-in Home PageThis plug-in is supported by the Static Analysis Collector plug-in that collects different analysis results and shows the results in aggregated trend graphs.
MavenVincent MassolCheckstyle supported out of the box example report
tIDEOlympe TeamBuilt inIncludes built-in Checkstyle support for code analysis during development.
NetBeansPetr HejlCheckstyle Beans Problems with source code are displayed as annotations of the source
NetBeansSQE TeamSoftware Quality Environment (SQE)Provides a comprehensive suite of quality assurance tools, including Checkstyle integration.
SonarQubeFreddy Mallet (initial author) Checkstyle SonarQube repositoryDemo site of SonarQube
jEditTodd Papaioannou JEdit CheckStylePlugin
IntelliJ IDEAJakub SlawinskiQAPlugProvides quality assurance features.
JArchitectJArchitect TeamJArchitect Home PageImports XML result files from CheckStyle.
SBTAndrew Johnson sbt-checkstyle-plugin Project PageSBT plugin for running Checkstyle on Java source files in an SBT project
code-assertStefan Niederhauser code-assertAssert that the java code of a project satisfies certain checks. Launch checkstyle validation from UTs
Emacs JDEMarkus MohnenPart of the standard JDEE distribution - configuration could be seen at jdee-checkstyle.el
NeovimMathias Fußeneggernvim-lintAn asynchronous linter plugin for Neovim complementary to the built-in Language Server Protocol support.
Visual Studio CodeSheng Chen vscode-checkstyleCheckstyle for Microsoft Visual Studio Code
Mega-LinterNicolas VuillamyCheckstyle supported out of the boxAutomatically detect 35 languages, 11 formats, 15 tooling formats and copy-pastes in your repository sources, and apply their related linters. Available as GitHub Action, other CI tools and locally
bldErik C. ThauvinCheckstyle Extension for bldAn extension for checking source code in a bld project
Vim editorCommunity (syntastic)Plugin syntastic how to setup.

Inactive or Old Tools

IDE / Build toolMain/Initial AuthorAvailable fromRemarks
QALabBenoit XhensevalQALab Home PageSupports tracking Checkstyle statistics over time.

If you have written a plugin for other IDEs, please let us know, so we can provide a link here.



[8]ページ先頭

©2009-2025 Movatter.jp