Checkstyle

Checkstyle

Language: Java
Checks: 164
Categories: Style
Checkstyle Version: 8.2

Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. It automates the process of checking Java code to spare humans of this boring (but important) task. This makes it ideal for projects that want to enforce a coding standard.

Enable the Plugin

To enable Checkstyle analysis, add the following to your .codeclimate.yml configuration file:

plugins:
  checkstyle:
    enabled: true

More information about the CLI is available in the README here: https://github.com/codeclimate/codeclimate.


Configure the Plugin

This engine ships with the following configuration file: codeclimate_checkstyle.xml . More configuration documentation is available from Checkstyle's documentation here.

To use your own configurations:

  1. Add this configuration to your .codeclimate.yml:
plugins:
  checkstyle:
    enabled: true
    config:
      file: "checkstyle.xml"
  1. And set the default Severity to warning, as shown in the checkstyle.xml example here:
...
<module name="Checker">
    <property name="severity" value="warning"/>
    ...

Understand the Plugin

For more information about all the checks available and their configuration options, please check out the documentation here: http://checkstyle.sourceforge.net/.

Checkstyle


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.