Skip to content

Commit bd38d6f

Browse files
committed
Merge remote-tracking branch 'origin/update-from-template' into develop
2 parents 8cb6046 + 95af404 commit bd38d6f

File tree

3 files changed

+40
-2
lines changed

3 files changed

+40
-2
lines changed

.github/workflows/checkBuild.yml renamed to .github/workflows/check-build.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ jobs:
7373
path: build/libs/intellij-plugin-save-actions-*.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:
@@ -93,3 +94,34 @@ jobs:
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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[![Latest version](https://img.shields.io/jetbrains/plugin/v/22113?logo=jetbrains)](https://plugins.jetbrains.com/plugin/22113)
2-
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/intellij-plugin-save-actions/checkBuild.yml?branch=develop)](https://github.com/xdev-software/intellij-plugin-save-actions/actions/workflows/checkBuild.yml?query=branch%3Adevelop)
2+
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/intellij-plugin-save-actions/check-build.yml?branch=develop)](https://github.com/xdev-software/intellij-plugin-save-actions/actions/workflows/check-build.yml?query=branch%3Adevelop)
33
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_intellij-plugin-save-actions&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_intellij-plugin-save-actions)
44
[![Feel free to leave a rating](https://img.shields.io/jetbrains/plugin/r/rating/22113?style=social&logo=jetbrains&label=Feel%20free%20to%20leave%20a%20rating)](https://plugins.jetbrains.com/plugin/22113/reviews)
55

build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
8187
tasks.withType(Checkstyle).configureEach {
8288
enabled = project.hasProperty("checkstyleEnabled");
8389
}

0 commit comments

Comments
 (0)