Skip to content

Commit 185d432

Browse files
author
Vincent Potucek
committed
bestpractices.xml/MissingOverride
1 parent 32d9512 commit 185d432

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@
1616
.factorypath
1717
.vscode/
1818
repo/
19-
/*.svg
19+
/*.svg
20+
.pmd/.cache

.pmd/ruleset.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Custom Rules"
3+
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
6+
<rule ref="category/java/bestpractices.xml/MissingOverride" />
7+
</ruleset>

pom.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,13 +793,29 @@ under the License.</licenseText>
793793
<plugin>
794794
<groupId>org.apache.maven.plugins</groupId>
795795
<artifactId>maven-pmd-plugin</artifactId>
796+
<configuration>
797+
<analysisCache>true</analysisCache>
798+
<analysisCacheLocation>.pmd/.cache</analysisCacheLocation>
799+
<printFailingErrors>true</printFailingErrors>
800+
<rulesets>
801+
<ruleset>.pmd/ruleset.xml</ruleset>
802+
</rulesets>
803+
</configuration>
796804
<dependencies>
797805
<dependency>
798806
<groupId>net.sourceforge.pmd</groupId>
799807
<artifactId>pmd-core</artifactId>
800808
<version>7.13.0</version>
801809
</dependency>
802810
</dependencies>
811+
<executions>
812+
<execution>
813+
<goals>
814+
<goal>check</goal>
815+
</goals>
816+
<phase>verify</phase>
817+
</execution>
818+
</executions>
803819
</plugin>
804820
<plugin>
805821
<groupId>org.eclipse.sisu</groupId>
@@ -816,6 +832,10 @@ under the License.</licenseText>
816832
</plugins>
817833
</pluginManagement>
818834
<plugins>
835+
<plugin>
836+
<groupId>org.apache.maven.plugins</groupId>
837+
<artifactId>maven-pmd-plugin</artifactId>
838+
</plugin>
819839
<plugin>
820840
<groupId>io.github.olamy.maven.plugins</groupId>
821841
<artifactId>jacoco-aggregator-maven-plugin</artifactId>
@@ -853,6 +873,7 @@ under the License.</licenseText>
853873
<exclude>**/*.odg</exclude>
854874
<exclude>**/*.svg</exclude>
855875
<exclude>.asf.yaml</exclude>
876+
<exclude>.pmd/ruleset.xml</exclude>
856877
<exclude>.mvn/**</exclude>
857878
<exclude>.jbang/**</exclude>
858879
<!--
@@ -1176,5 +1197,19 @@ under the License.</licenseText>
11761197
</plugins>
11771198
</build>
11781199
</profile>
1200+
<profile>
1201+
<id>pmd-check</id>
1202+
<activation>
1203+
<activeByDefault>true</activeByDefault>
1204+
</activation>
1205+
<build>
1206+
<plugins>
1207+
<plugin>
1208+
<groupId>org.apache.maven.plugins</groupId>
1209+
<artifactId>maven-pmd-plugin</artifactId>
1210+
</plugin>
1211+
</plugins>
1212+
</build>
1213+
</profile>
11791214
</profiles>
11801215
</project>

0 commit comments

Comments
 (0)