This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)(Learn how and when to remove this template message)
7.5.1 / February 4, 2017
|Type||Static code analysis|
|License||Lesser GNU General Public License|
Advantages and limits
The programming style adopted by a software development project can help to comply with good programming practices which improve the code quality, readability, re-usability, and reduce the cost of development. The performed checks mainly limit themselves to the presentation and don't analyze content, and do not confirm the correctness or completeness of the program. In practice, it can be tedious to comply with all the style constraints, some of which could possibly harm the programming stages' dynamic; so, it may be useful to determine which level of check is needed for a certain type of program.
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:
- Javadoc comments for classes, attributes and methods;
- Naming conventions of attributes and methods;
- Limit of the number of function parameters, line lengths;
- Presence of mandatory headers;
- The use of packets imports, of classes, of scope modifiers and of instructions blocks;
- The spaces between some characters;
- The good practices of class construction;
- Duplicated code sections;
- Multiple complexity measurements, among which expressions.
A Checkstyle plug-in can provide new functionalities, like:
- overload syntax coloring or decorations in code editor;
- decorate the project explorer to highlight problem-posing resources;
- add warnings and errors outputs to the outputs.
Thus, the developer can directly access the code parts highlighted by Checkstyle.
Checkstyle, originally developed by Oliver Burn back in 2001, is maintained by a team of several developers around the world.
- List of tools for static code analysis
- EclipseCS - Eclipse plugin for checkstyle.
- Checkstyle-IDEA - Checkstyle plugin for IntelliJ IDEA and Android Studio
- SevNTU-Checkstyle - 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
|This software-engineering-related article is a stub. You can help Wikipedia by expanding it.|