Skip to content

Commit 1271841

Browse files
Introduce a gradle spotbugs plugin (#242)
1 parent 08fb9c2 commit 1271841

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/cicd.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ jobs:
9696
run: |
9797
sudo apt-get update -y
9898
sudo apt-get install -y clang-format cppcheck
99-
curl -L -o spotbugs-4.7.3.zip https://github.com/spotbugs/spotbugs/releases/download/4.7.3/spotbugs-4.7.3.zip
100-
unzip spotbugs-4.7.3.zip
10199
102100
- name: Install opensource COBOL 4J
103101
run: |
@@ -110,15 +108,16 @@ jobs:
110108
run: |
111109
./check-format
112110
113-
- name: Run SpotBugs
111+
- name: Run SpotBugs (ignore results)
114112
run: |
115-
java -jar spotbugs-4.7.3/lib/spotbugs.jar -textui libcobj/app/build/classes
113+
cd libcobj
114+
./gradlew spotbugsMain || true
116115
117116
- name: Run PMD
118117
run: |
119118
cd libcobj
120119
./gradlew pmdMain
121120
122-
- name: Run cppcheck
121+
- name: Run cppcheck (ignore results)
123122
run: |
124123
cd cobj && cppcheck cobj.c cobj.h codegen.c config.c error.c field.c pplex.c ppparse.c ppparse.h reserved.c tree.c tree.h typeck.c

libcobj/app/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ plugins {
77
id("com.github.sherter.google-java-format") version "0.9"
88
id("maven-publish")
99
pmd
10+
id("com.github.spotbugs") version "6.0.0-rc.2"
1011
}
1112

1213
repositories {
@@ -15,8 +16,8 @@ repositories {
1516

1617
dependencies {
1718
implementation("com.google.guava:guava:31.1-jre")
18-
1919
implementation("org.xerial:sqlite-jdbc:3.30.1")
20+
spotbugs("com.github.spotbugs:spotbugs:4.8.0")
2021
}
2122

2223
java {

0 commit comments

Comments
 (0)