Check style
Check style
|
|
---|---|
Basic data
|
|
Current version | 8.29 (January 26, 2020) |
operating system | cross-platform |
programming language | Java |
category | Static code analysis |
License | GNU Lesser General Public License |
https://checkstyle.org |
Checkstyle is a tool used in software development for static code analysis to check the programming style of Java source code.
operation area
The programming style used in software development projects can improve software quality, readability, and reusability. This can reduce the costs of developing and maintaining the software. Checkstyle can perform a number of automatable tests of the programming style. These tests can be switched on and off individually and configured for the programming style defined in the project to be tested. Failure of a test leads to an error or a warning, depending on the configuration of the test. Checkstyle can be expanded to include your own tests.
Checkstyle is not a tool for the automated detection of programming errors. By pointing out unwanted programming styles, however, programming errors can be found or avoided with the help of Checkstyle.
Checkstyle is also not a tool for the automated elimination of incorrect programming styles. For errors in the formatting of the code, programs for source code formatting can be used.
Modules
Checkstyle comes with a number of modules that contain exams on specific topics. These modules can be expanded to include your own modules with your own exams.
- Annotation - Checks for the correct use of annotations
- Block Checks - checks of blocks of code
- Class Design - exams on software design
- Coding - reviews of general coding guidelines
- Duplicate Code - checks for the presence of duplicate codes (up to version 6.1.1)
- Headers - checks on headers of source code files
- Imports - Checks for using imports
- Javadoc Comments - Checks for the existence, completeness and formatting of Javadoc comments
- Metrics - Checks for compliance with various software metrics
- Miscellaneous - various exams that cannot be classified in the other modules
- Modifiers - Checks for the correct use of access modifiers
- Naming Conventions - Checks for compliance with defined naming conventions
- Regexp - Checks that can be configured using regular expressions
- Size violations - checks on the size of classes, methods, number of parameters, etc.
- Whitespace - checks to format the code for spaces
commitment
Checkstyle is delivered as a Java archive and can therefore run in any Java virtual machine and as an Apache Ant task. A number of tools provide plugins for Checkstyle, including Eclipse , Apache Maven or SonarQube .
history
Checkstyle was originally developed by Oliver Burn in 2001 and is now maintained and further developed as open source software by a number of developers.
Alternatives
In the Java environment, besides Checkstyle, PMD and FindBugs are usually used for similar purposes as Checkstyle. See also List of Tools for Static Code Analysis .