logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

checkstyle - static code analysis tool to check if Java source code complies with coding rules

Example

       Check the source files in the src/main/java directory using the Google Java Style:

           checkstyle -c /usr/share/checkstyle/google_checks.xml src/main/java

Name

       checkstyle -  static code analysis tool to check if Java source code complies with coding rules

Options

file
         Specify the Java source code file to check.

       -cconfigurationFile
         Specify the file that configures the checks to apply.

       -fformat
         Specify  the  output  format.  Options  are  "plain" for the DefaultLogger and "xml" for the XMLLogger.
         Defaults to "plain".

       -ppropertiesFile
         Specify a properties file to use.

       -ofile
         Specify the file to output to.

Overview

       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.

       Checkstyle is highly configurable and can be made to support almost any coding standard.

       Checkstyle is highly configurable and can be made to support almost any coding standard. Example
       configuration files are supplied supporting the Sun Code Conventions and Google Java Style.

       For information about Checkstyle, it can be found at http://checkstyle.sourceforge.net/.

See Also

Synopsis

       checkstyle -c configurationFile [options] [file]

See Also