Skip to content

Latest commit

 

History

History
96 lines (89 loc) · 3.65 KB

README.md

File metadata and controls

96 lines (89 loc) · 3.65 KB

Innovative License Management Solution

Labs64 Java Code Style

Labs64 Java Code Style - CI Maven Central Apache License 2.0 Labs64 @ LinkedIn

Quick Start

The recommended way to get started using code-analysis in your project is with a dependency management system – the snippets below can be copied and pasted into your build configuration.

Maven:

<!-- https://maven.apache.org/plugins/maven-checkstyle-plugin/usage.html -->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-checkstyle-plugin</artifactId>
    <version>${maven-checkstyle-plugin.version}</version>
    <configuration>
        <configLocation>labs64-code-analysis/checkstyle.xml</configLocation>
        <failsOnError>false</failsOnError>
    </configuration>
    <executions>
        <execution>
            <id>checkstyle</id>
            <goals>
                <goal>check</goal>
            </goals>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>com.labs64.commons</groupId>
            <artifactId>code-analysis</artifactId>
            <version>${labs64.code-analysis.version}</version>
        </dependency>
    </dependencies>
</plugin>

<!-- https://spotbugs.github.io -->
<plugin>
    <groupId>com.github.spotbugs</groupId>
    <artifactId>spotbugs-maven-plugin</artifactId>
    <version>${spotbugs-maven-plugin.version}</version>
    <configuration>
        <includeFilterFile>labs64-code-analysis/spotbugs.xml</includeFilterFile>
        <failOnError>false</failOnError>
    </configuration>
    <executions>
        <execution>
            <id>spotbugs</id>
            <goals>
                <goal>check</goal>
            </goals>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>com.labs64.commons</groupId>
            <artifactId>code-analysis</artifactId>
            <version>${labs64.code-analysis.version}</version>
        </dependency>
    </dependencies>
</plugin>

<!-- https://maven.apache.org/plugins/maven-pmd-plugin/usage.html -->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-pmd-plugin</artifactId>
    <version>${maven-pmd-plugin.version}</version>
    <configuration>
        <rulesets>
            <ruleset>labs64-code-analysis/pmd.xml</ruleset>
        </rulesets>
        <failOnViolation>false</failOnViolation>
        <printFailingErrors>true</printFailingErrors>
    </configuration>
    <executions>
        <execution>
            <id>pmd</id>
            <goals>
                <goal>check</goal>
            </goals>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>com.labs64.commons</groupId>
            <artifactId>code-analysis</artifactId>
            <version>${labs64.code-analysis.version}</version>
        </dependency>
    </dependencies>
</plugin>