Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade PMD to 7.7.0 and combine metrics into same plugin executions #1206

Merged
merged 1 commit into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/quality-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ jobs:
"metric": "mutation",
"sourcePath": "src/main/java",
"pattern": "**/target/pit-reports/mutations.xml"
},
{
"id": "pit",
"name": "Test Strength",
"metric": "test-strength",
"sourcePath": "src/main/java",
"pattern": "**/target/pit-reports/mutations.xml"
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions etc/pmd-java-configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
<exclude name="AccessorMethodGeneration"/>
<exclude name="LooseCoupling"/>
<exclude name="GuardLogStatement"/>
<exclude name="JUnit4TestShouldUseTestAnnotation"/>
<exclude name="UnitTestShouldUseTestAnnotation"/>
<exclude name="JUnit5TestShouldBePackagePrivate"/>
<exclude name="JUnitAssertionsShouldIncludeMessage"/>
<exclude name="JUnitTestContainsTooManyAsserts"/>
<exclude name="JUnitTestsShouldIncludeAssert"/>
<exclude name="UnitTestAssertionsShouldIncludeMessage"/>
<exclude name="UnitTestContainsTooManyAsserts"/>
<exclude name="UnitTestShouldIncludeAssert"/>
<exclude name="LiteralsFirstInComparisons"/>
<exclude name="UnusedPrivateMethod"/>
</rule>
Expand Down
8 changes: 4 additions & 4 deletions etc/pmd-tests-configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<rule ref="category/java/bestpractices.xml">
<exclude name="AccessorMethodGeneration"/>
<exclude name="GuardLogStatement"/>
<exclude name="JUnit4TestShouldUseTestAnnotation"/>
<exclude name="UnitTestShouldUseTestAnnotation"/>
<exclude name="JUnit5TestShouldBePackagePrivate"/>
<exclude name="JUnitAssertionsShouldIncludeMessage"/>
<exclude name="JUnitTestContainsTooManyAsserts"/>
<exclude name="JUnitTestsShouldIncludeAssert"/>
<exclude name="UnitTestAssertionsShouldIncludeMessage"/>
<exclude name="UnitTestContainsTooManyAsserts"/>
<exclude name="UnitTestShouldIncludeAssert"/>
<exclude name="LiteralsFirstInComparisons"/>
<exclude name="LooseCoupling"/>
<exclude name="UnusedPrivateMethod"/>
Expand Down
34 changes: 5 additions & 29 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<maven-failsafe-plugin.version>3.5.1</maven-failsafe-plugin.version>
<maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
<maven-pmd-plugin.version>3.25.0</maven-pmd-plugin.version>
<pmd.version>7.6.0</pmd.version>
<pmd.version>7.7.0</pmd.version>
<maven-checkstyle-plugin.version>3.6.0</maven-checkstyle-plugin.version>
<checkstyle.version>10.18.2</checkstyle.version>
<spotbugs-maven-plugin.version>4.8.6.4</spotbugs-maven-plugin.version>
Expand Down Expand Up @@ -775,14 +775,14 @@
</configuration>
<dependencies>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<groupId>edu.hm.hafner</groupId>
<artifactId>pmd-core</artifactId>
<version>${pmd.version}</version>
<version>${pmd.version}-metrics</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<groupId>edu.hm.hafner</groupId>
<artifactId>pmd-java</artifactId>
<version>${pmd.version}</version>
<version>${pmd.version}-metrics</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
Expand Down Expand Up @@ -832,29 +832,6 @@
<skip>${pmd.skip}</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<linkXRef>false</linkXRef>
<targetJdk>${java.version}</targetJdk>
<skip>true</skip>
</configuration>
<dependencies>
<dependency>
<groupId>edu.hm.hafner</groupId>
<artifactId>pmd-core</artifactId>
<version>7.5.0-metrics</version>
</dependency>
<dependency>
<groupId>edu.hm.hafner</groupId>
<artifactId>pmd-java</artifactId>
<version>7.5.0-metrics</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>run-pmd-metrics</id>
<goals>
Expand All @@ -873,7 +850,6 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand Down