Misplaced Pages

Checkstyle

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Java code analysis tool
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
This article relies excessively on references to primary sources. Please improve this article by adding secondary or tertiary sources.
Find sources: "Checkstyle" – news · newspapers · books · scholar · JSTOR (July 2010) (Learn how and when to remove this message)
This article needs to be updated. Please help update this article to reflect recent events or newly available information. (August 2015)
(Learn how and when to remove this message)
Checkstyle
Stable release10.21.0 / December 12, 2024; 7 days ago (2024-12-12)
Repositorygithub.com/checkstyle/checkstyle
Written inJava
Operating systemCross-platform
TypeStatic code analysis
LicenseGNU Lesser General Public License
Websitecheckstyle.sourceforge.net Edit this at Wikidata

Checkstyle 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 back in 2001, the project is maintained by a team of developers from around the world.

The current stable release is version 10.21.0 which supports Java versions from 11 to 17.

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

References

  1. "Checkstyle Home Page". 2010. Retrieved 2010-11-02.
  2. "checkstyle – Release Notes". checkstyle.sourceforge.io. Retrieved 2024-12-17.
  3. "checkstyle – Checkstyle Home Page". checkstyle.sourceforge.io. Retrieved 2024-12-17.

External links

Software engineering
Fields
Concepts
Orientations
Models
Developmental
Other
Languages
Related fields


Stub icon

This software-engineering-related article is a stub. You can help Misplaced Pages by expanding it.

Categories: