Skip to content

Instantly share code, notes, and snippets.

@artsok
Created October 10, 2023 08:04
Show Gist options
  • Save artsok/1fa07aa81233ae33dcd08d7ce2440b80 to your computer and use it in GitHub Desktop.
Save artsok/1fa07aa81233ae33dcd08d7ce2440b80 to your computer and use it in GitHub Desktop.
pom_checkstyle.xml
<!-- ===================================================================== -->
<!-- ======================== Checkstyle ================================= -->
<!-- ===================================================================== -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyle-plugin.version}</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${checkstyle.version}</version>
</dependency>
<dependency>
<groupId>com.emirates.urp</groupId>
<artifactId>urp-checkstyle-rules</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>validate</id>
<goals>
<goal>check</goal>
</goals>
<phase>validate</phase>
<configuration>
<configLocation>src/main/resources/checkstyle.xml</configLocation>
<suppressionsLocation>src/main/resources/checkstyle-suppressions.xml</suppressionsLocation>
<encoding>${project.build.sourceEncoding}</encoding>
<consoleOutput>true</consoleOutput>
<violationSeverity>warning</violationSeverity>
<failOnViolation>${checkstyle.failOnViolation}</failOnViolation>
<failsOnError>${checkstyle.failsOnError}</failsOnError>
<!-- <excludes>**/resources/**/*</excludes>-->
</configuration>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment