Checkstyle
| Checkstyle | |
|---|---|
| Stable release | 13.0.0
/ January 4, 2026 |
| Written in | Java |
| Operating system | Cross-platform |
| Type | Static code analysis |
| License | GNU Lesser General Public License |
| Website | checkstyle |
| Repository | github |
Checkstyle[1] is a static code analysis tool used in software development for checking if Java source code is compliant with specified coding rules.
Originally developed by Oliver Burn in 2001, the project is maintained by a team of developers from around the world.
The current stable release is version 13.0.0[2] which supports Java versions from 21.[3]
Advantages and limits
The programming style adopted by a software development project can help to ensure that the code is compliant with good programming practices which improve the quality, readability, and re-usability of the code and may reduce the cost of development. The checks performed by Checkstyle are mainly limited to the presentation of the code. These checks do not confirm the correctness or completeness of the code. Checkstyle rules are not programming style, they are merely rules for formatting the code.
Examples of available modules
Checkstyle defines a set of available modules, each of which provides rules checking with a configurable level of strictness (mandatory, optional...). Each rule can raise notifications, warnings, and errors. For example, Checkstyle can examine the following:
- Javadoc comments for classes, attributes and methods;
- Naming conventions of attributes and methods;
- The number of function parameters;
- Line lengths;
- The presence of mandatory headers;
- The use of imports, and scope modifiers;
- The spaces between some characters;
- The practices of class construction;
- Multiple complexity measurements.
Usage
Checkstyle is available as a JAR file which can run inside a Java VM or as an Apache Ant task. It can also be integrated into an IDE or other tools.
See also
- List of tools for static code analysis
- EclipseCS - Eclipse plugin for checkstyle.
- Checkstyle-IDEA - Checkstyle plugin for IntelliJ IDEA and Android Studio
- SevNTU-Checkstyle Archived 2013-03-22 at the Wayback Machine - extension for EclipseCS with number of check that are not part of checkstyle upstream.
- Checkstyle Addons - Additional Checkstyle checks
- Checkstyle for PHP - a PHP version of Checkstyle
References
- ^ "Checkstyle Home Page". Retrieved 2025-11-19.
- ^ "Checkstyle – Release Notes". checkstyle.sourceforge.io. Retrieved 2026-01-14.
- ^ "Checkstyle – Checkstyle Home Page". checkstyle.sourceforge.io. Retrieved 2026-01-14.
External links
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.