File tree Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Original file line number Diff line number Diff line change 7373 path : build/libs/template-placeholder-*.jar
7474 if-no-files-found : error
7575
76- code-style :
76+ checkstyle :
7777 runs-on : ubuntu-latest
78+ if : ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
7879
7980 strategy :
8081 matrix :
9394
9495 - name : Run Checkstyle
9596 run : ./gradlew checkstyleMain checkstyleTest -PcheckstyleEnabled=true
97+
98+ pmd :
99+ runs-on : ubuntu-latest
100+ if : ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
101+
102+ strategy :
103+ matrix :
104+ java : [17]
105+ distribution : [temurin]
106+
107+ steps :
108+ - uses : actions/checkout@v4
109+
110+ - name : Set up JDK
111+ uses : actions/setup-java@v4
112+ with :
113+ distribution : ${{ matrix.distribution }}
114+ java-version : ${{ matrix.java }}
115+ cache : ' gradle'
116+
117+ - name : Run PMD
118+ run : ./gradlew pmdMain pmdTest
119+
120+ - name : Upload report
121+ if : always()
122+ uses : actions/upload-artifact@v4
123+ with :
124+ name : pmd-report
125+ if-no-files-found : ignore
126+ path : |
127+ build/reports/pmd/*.html
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ plugins {
22 id ' java'
33 id ' idea'
44 id ' checkstyle'
5+ id ' pmd'
56 id ' org.jetbrains.intellij' version ' 1.17.4'
67 id ' org.sonarqube' version ' 5.0.0.4638'
78}
@@ -78,6 +79,11 @@ checkstyle {
7879 toolVersion = checkstyleVersion
7980}
8081
82+ pmd {
83+ consoleOutput = true
84+ ruleSetFiles = files(" .config/pmd/ruleset.xml" )
85+ }
86+
8187tasks. withType(Checkstyle ). configureEach {
8288 enabled = project. hasProperty(" checkstyleEnabled" );
8389}
You can’t perform that action at this time.
0 commit comments