Skip to content

Commit

Permalink
Merge pull request #1004 from uhafner/fail-build-on-violations
Browse files Browse the repository at this point in the history
Fail build on CheckStyle or PMD violations
  • Loading branch information
uhafner authored Apr 29, 2024
2 parents 23c497d + ef6baa3 commit af58a9b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,6 @@
<version>${maven-pmd-plugin.version}</version>
<configuration>
<linkXRef>false</linkXRef>
<failOnViolation>false</failOnViolation>
<targetJdk>${java.version}</targetJdk>
</configuration>
<dependencies>
Expand All @@ -576,6 +575,7 @@
<id>run-pmd-java</id>
<goals>
<goal>pmd</goal>
<goal>check</goal>
<goal>cpd</goal>
</goals>
<phase>verify</phase>
Expand All @@ -592,6 +592,7 @@
<id>run-pmd-tests</id>
<goals>
<goal>pmd</goal>
<goal>check</goal>
<goal>cpd</goal>
</goals>
<phase>verify</phase>
Expand All @@ -618,7 +619,7 @@
<configuration>
<linkXRef>false</linkXRef>
<excludeGeneratedSources>true</excludeGeneratedSources>
<failsOnError>false</failsOnError>
<violationSeverity>warning</violationSeverity>
</configuration>
<dependencies>
<dependency>
Expand All @@ -631,7 +632,7 @@
<execution>
<id>run-checkstyle-java</id>
<goals>
<goal>checkstyle</goal>
<goal>check</goal>
</goals>
<phase>verify</phase>
<configuration>
Expand All @@ -644,14 +645,15 @@
<execution>
<id>run-checkstyle-tests</id>
<goals>
<goal>checkstyle</goal>
<goal>check</goal>
</goals>
<phase>verify</phase>
<configuration>
<excludes>**/*Assert*.java,**/*_jmh*,**/module-info.java</excludes>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<configLocation>etc/checkstyle-tests-configuration.xml</configLocation>
<outputFile>${project.build.directory}/checkstyle-tests/checkstyle-result.xml</outputFile>
<sourceDirectories></sourceDirectories>
</configuration>
</execution>
</executions>
Expand Down

0 comments on commit af58a9b

Please sign in to comment.