Checks Java source code against configurable coding-standard rules
open sourceLGPL-2.1-or-laterfree
Checkstyle analyses Java source code against configurable rules for naming, imports, formatting and whitespace, Javadoc, class design, size and other coding practices, so a team's coding standard is enforced automatically. It ships configurations for Google's Java style, Sun's code conventions and OpenJDK's style, runs from the command line, an Ant task and build tool plugins, and can be extended with your own checks, filters and listeners.
Problems it solves
- I want to enforce a Java coding standard automatically in CI
- My team keeps arguing about Java code style in code reviews
- I need to check Java code against Google's Java style guide
Features
- Checks naming, imports, Javadoc, formatting, whitespace, class design, size and coding practices
- Ready-made configurations for Google's, Sun's and OpenJDK's Java styles
- Runs from the command line and as an Ant task
- XPath-based suppression and filters
- Extensible with custom checks, filters and listeners
Alternatives
The same job
These do what Checkstyle does.
- PHP_CodeSniffer Detect and fix coding standard violations in PHP
- Slevomat Coding Standard Extra PHP_CodeSniffer sniffs for safer, cleaner and consistently formatted PHP
- XO Zero-config JavaScript and TypeScript linter built on ESLint
