diff --git a/.github/workflows/quality-monitor.yml b/.github/workflows/quality-monitor.yml index cec51e80..22a6ef2f 100644 --- a/.github/workflows/quality-monitor.yml +++ b/.github/workflows/quality-monitor.yml @@ -38,7 +38,7 @@ jobs: uses: jwalton/gh-find-current-pr@v1 id: pr - name: Run Quality Monitor - uses: uhafner/quality-monitor@v1 + uses: uhafner/quality-monitor@v1.12.0-beta-1 with: github-token: ${{ secrets.GITHUB_TOKEN }} pr-number: ${{ steps.pr.outputs.number }} @@ -129,5 +129,36 @@ jobs: } ] } + ], + "metrics": [ + { + "name": "Toplevel Metrics", + "tools": [ + { + "name": "Cyclomatic Complexity", + "id": "metrics", + "pattern": "**/metrics.xml", + "metric": "CyclomaticComplexity" + }, + { + "name": "Cognitive Complexity", + "id": "metrics", + "pattern": "**/metrics.xml", + "metric": "CognitiveComplexity" + }, + { + "name": "Non Commenting Source Statements", + "id": "metrics", + "pattern": "**/metrics.xml", + "metric": "NCSS" + }, + { + "name": "N-Path Complexity", + "id": "metrics", + "pattern": "**/metrics.xml", + "metric": "NPathComplexity" + } + ] + } ] } diff --git a/pom.xml b/pom.xml index 19f2b38d..82d20be6 100644 --- a/pom.xml +++ b/pom.xml @@ -828,6 +828,46 @@ + + org.apache.maven.plugins + maven-pmd-plugin + + false + ${java.version} + true + + + + edu.hm.hafner + pmd-core + 7.5.0-metrics + + + edu.hm.hafner + pmd-java + 7.5.0-metrics + + + + + run-pmd-metrics + + pmd + + verify + + ${project.build.directory}/pmd-metrics + + /category/java/metric.xml + + net.sourceforge.pmd.renderers.MetricsRenderer + false + ${pmd.skip} + + + + + org.apache.maven.plugins maven-release-plugin