Skip to content

Latest commit

 

History

History
69 lines (55 loc) · 2.1 KB

File metadata and controls

69 lines (55 loc) · 2.1 KB

Java Checkstyle Config

Checkstyle config for all JAVA projects.

Usage

Add the maven-checkstyle-plugin to your pom.xml:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-checkstyle-plugin</artifactId>
    <version>3.5.0</version>
    <configuration>
        <configLocation>checkstyle.xml</configLocation>
        <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
        <includeTestSourceDirectory>true</includeTestSourceDirectory>
        <consoleOutput>true</consoleOutput>
        <failsOnError>true</failsOnError>
        <linkXRef>false</linkXRef>
    </configuration>
    <executions>
        <execution>
            <id>validate</id>
            <phase>validate</phase>
            <goals>
                <goal>check</goal>
            </goals>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>10.18.1</version>
        </dependency>
        <dependency>
            <groupId>it.aboutbits</groupId>
            <artifactId>java-checkstyle-config</artifactId>
            <version>1.0.0</version>
        </dependency>
    </dependencies>
</plugin>

Configure your IDE:
First you need to run mvn verify once. In your IDE go to Settings then search for "checkstyle".
Add a new checkstyle configuration and select the target/checkstyle-checker.xml file.
Set the property org.checkstyle.sun.suppressionfilter.config to checkstyle-suppressions.xml

Build & Publish

To build and publish the chart, visit the GitHub Actions page of the repository and trigger the workflow "Release Package" manually.

Information

About Bits is a company based in South Tyrol, Italy. You can find more information about us on our website.

Support

For support, please contact info@aboutbits.it.

Credits

License

The MIT License (MIT). Please see the license file for more information.