Skip to content

Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Google Java Style Guide and Sun Code Conventions, but is highly configurable. It can be invoked with an ANT task and a command line program.

License

Notifications You must be signed in to change notification settings

Nishantware/checkstyle

This branch is 256 commits behind checkstyle/checkstyle:master.

Folders and files

NameName
Last commit message
Last commit date
Nov 9, 2024
Sep 1, 2024
Nov 22, 2024
Aug 27, 2022
Oct 6, 2024
Nov 30, 2024
Nov 3, 2024
Dec 4, 2024
Mar 21, 2024
Jan 8, 2024
Oct 6, 2023
Oct 31, 2020
Mar 20, 2023
Aug 8, 2023
Jan 7, 2017
Dec 14, 2021
Nov 9, 2024
Jun 30, 2019
Aug 10, 2022
Nov 26, 2023
Jun 22, 2024
Jul 14, 2024
Dec 5, 2024

Repository files navigation

Checkstyle - Java Code Quality Tool


Checkstyle is a tool that ensures adherence to a code standard or a set of best practices.

The latest release version can be found at GitHub releases or at Maven repo.

Each-commit builds of maven artifacts can be found at Maven Snapshot repository.

Documentation is available in HTML format, see https://checkstyle.org/checks.html .

Table of Contents

Quick Start

$ cat config.xml
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
          "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
          "https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
  <module name="TreeWalker">
    <module name="FallThrough"/>
  </module>
</module>

$ cat Test.java
class Test {
  public void foo() {
    int i = 0;
    while (i >= 0) {
      switch (i) {
        case 1:
        case 2:
          i++;
        case 3: // violation 'fall from previous branch of the switch'
          i++;
      }
    }
  }
}

$ java -jar checkstyle-10.18.1-all.jar -c config.xml Test.java
Starting audit...
[ERROR] Test.java:9:9: Fall through from previous branch of switch statement [FallThrough]
Audit done.
Checkstyle ends with 1 errors.

Contributing

Thanks for your interest in contributing to CheckStyle! Please see the Contribution Guidelines for information on how to contribute to the project. This includes creating issues, submitting pull requests, and setting up your development environment.

Build Instructions

Please see the CheckStyle Documentation for information on how to build the project.

Feedback and Support

  • Visit our Discussions Page, where you can ask questions and discuss the project with other users and contributors. This is our preferred method of communication for topics like usage and configuration questions, debugging, and other feedback.
  • Stack Overflow is another place to ask questions about Checkstyle usage.
  • If you are interested in contributing to the project, you can join our Discord Contributors Chat.
  • Our Google Groups Forum is a mailing list for discussion and support; however, we may be slow to respond there.

Javadoc

Take a look at our javadoc to see our API documentation.

Sponsor Checkstyle

Checkstyle is an open-source project that is developed and maintained by volunteers. If you find Checkstyle useful, please consider sponsoring the project. Your support helps us to maintain and improve Checkstyle.

Licensing

Checkstyle is licensed under the GNU LGPL v2.1 License. Checkstyle uses libraries:

About

Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Google Java Style Guide and Sun Code Conventions, but is highly configurable. It can be invoked with an ANT task and a command line program.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 98.0%
  • HTML 0.8%
  • Shell 0.6%
  • Groovy 0.2%
  • ANTLR 0.2%
  • JavaScript 0.1%
  • Other 0.1%