From 646c7082c3d2e9338db745070d714c8cd236c812 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Wed, 8 May 2024 09:40:32 +0200 Subject: [PATCH 1/3] Activate ErrorProne reporting in QualityMonitor. --- .github/workflows/quality-monitor.yml | 97 +++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/.github/workflows/quality-monitor.yml b/.github/workflows/quality-monitor.yml index b9c72bae..d5f469b6 100644 --- a/.github/workflows/quality-monitor.yml +++ b/.github/workflows/quality-monitor.yml @@ -34,3 +34,100 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} pr-number: ${{ steps.pr.outputs.number }} + configuration: | + { + "tests": { + "name": "Tests", + "tools": [ + { + "id": "test", + "name": "Tests", + "pattern": "**/target/*-reports/TEST*.xml" + } + ], + "passedImpact": 0, + "skippedImpact": -1, + "failureImpact": -5, + "maxScore": 100 + }, + "analysis": [ + { + "name": "Style", + "id": "style", + "tools": [ + { + "id": "checkstyle", + "pattern": "**/target/**checkstyle-result.xml" + }, + { + "id": "pmd", + "pattern": "**/target/**pmd.xml" + } + ], + "errorImpact": -1, + "highImpact": -1, + "normalImpact": -1, + "lowImpact": -1, + "maxScore": 100 + }, + { + "name": "Bugs", + "id": "bugs", + "icon": "bug", + "tools": [ + { + "id": "spotbugs", + "sourcePath": "src/main/java", + "pattern": "**/target/spotbugsXml.xml" + }, + { + "id": "errorprone", + "pattern": "**/maven.log" + } + ], + "errorImpact": -3, + "highImpact": -3, + "normalImpact": -3, + "lowImpact": -3, + "maxScore": 100 + } + ], + "coverage": [ + { + "name": "Code Coverage", + "tools": [ + { + "id": "jacoco", + "name": "Line Coverage", + "metric": "line", + "sourcePath": "src/main/java", + "pattern": "**/target/site/jacoco/jacoco.xml" + }, + { + "id": "jacoco", + "name": "Branch Coverage", + "metric": "branch", + "sourcePath": "src/main/java", + "pattern": "**/target/site/jacoco/jacoco.xml" + } + ], + "maxScore": 100, + "missedPercentageImpact": -1 + }, + { + "name": "Mutation Coverage", + "tools": [ + { + "id": "pit", + "name": "Mutation Coverage", + "metric": "mutation", + "sourcePath": "src/main/java", + "pattern": "**/target/pit-reports/mutations.xml" + } + ], + "maxScore": 100, + "missedPercentageImpact": -1 + } + ] + } + From 7c82d0aefca03f06a5b4d2c2f9bb098953749bd2 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Wed, 8 May 2024 10:34:32 +0200 Subject: [PATCH 2/3] Fix config syntax. --- .github/workflows/quality-monitor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/quality-monitor.yml b/.github/workflows/quality-monitor.yml index d5f469b6..39621bc2 100644 --- a/.github/workflows/quality-monitor.yml +++ b/.github/workflows/quality-monitor.yml @@ -34,7 +34,7 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} pr-number: ${{ steps.pr.outputs.number }} - configuration: | + config: > { "tests": { "name": "Tests", From b07ddc831bf677b03d8253ebdc801d3636ef2e59 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Wed, 8 May 2024 10:37:11 +0200 Subject: [PATCH 3/3] Run SpotBugs only once. --- pom.xml | 1 - src/main/java/edu/hm/hafner/util/Ensure.java | 1 - 2 files changed, 2 deletions(-) diff --git a/pom.xml b/pom.xml index f7c3c192..d85bc213 100644 --- a/pom.xml +++ b/pom.xml @@ -758,7 +758,6 @@ run-spotbugs - spotbugs check verify diff --git a/src/main/java/edu/hm/hafner/util/Ensure.java b/src/main/java/edu/hm/hafner/util/Ensure.java index 92e13308..9438f903 100644 --- a/src/main/java/edu/hm/hafner/util/Ensure.java +++ b/src/main/java/edu/hm/hafner/util/Ensure.java @@ -521,7 +521,6 @@ public ObjectCondition(@CheckForNull final T value) { * @param additionalValues * additional values of the condition */ - @SuppressFBWarnings("EI2") @SuppressWarnings("PMD.ArrayIsStoredDirectly") public ObjectCondition(@CheckForNull final T value, @CheckForNull final Object... additionalValues) { this.value = value;