From 92299263d01d781587c8357ba71d15170ecdcd1a Mon Sep 17 00:00:00 2001 From: jdrueckert Date: Tue, 13 Aug 2024 01:54:55 +0200 Subject: [PATCH] ci: enable PMD checks (#5273) * ci: enable PMD checks * ci: record PMD check findings and align instructions * ci: fix `java.lang.NoSuchMethodError` Jenkins complaiend about: ``` Error when executing always post condition: java.lang.NoSuchMethodError: No such DSL method 'pmd' found among steps [..., pmdParser, ...] ``` * ci: pmdParser expects xml according to https://javadoc.jenkins.io/plugin/violations/hudson/plugins/violations/types/pmd/PMDParser.html --- Jenkinsfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e0d30fc9a65..30960572716 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -121,7 +121,7 @@ pipeline { stage('Analytics') { steps { - sh './gradlew --console=plain check -x test -x pmdMain -x pmdTest -x pmdJmh' // TODO: Probably more cleanly remove PMD overall if no use? + sh './gradlew --console=plain check -x test' } post { always { @@ -139,9 +139,10 @@ pipeline { ]) recordIssues(skipBlames: true, enabledForFailure: true, - tools: [ - spotBugs(pattern: '**/build/reports/spotbugs/*.xml', useRankAsPriority: true) - ]) + tool: spotBugs(pattern: '**/build/reports/spotbugs/*.xml', useRankAsPriority: true)) + + recordIssues(skipBlames: true, enabledForFailure: true, + tool: pmdParser(pattern: '**/build/reports/pmd/*.xml', useRankAsPriority: true)) recordIssues(skipBlames: true, enabledForFailure: true, tool: taskScanner(includePattern: '**/*.java,**/*.groovy,**/*.gradle', \