Skip to content

Commit

Permalink
ci: enable PMD checks (#5273)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jdrueckert authored Aug 12, 2024
1 parent 902e31c commit 9229926
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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', \
Expand Down

0 comments on commit 9229926

Please sign in to comment.