Skip to content

Commit 9f891a0

Browse files
committed
Bundle SpotBugs distribution under tools/spotbugs/
Move from requiring a separate SpotBugs installation to bundling the full 4.9.3 lib/ directory under tools/spotbugs/. This means developers can run 'ant spotbugs' with no extra setup. Remove standalone spotbugs-ant jar from extlib. Simplify GH Action to use bundled copy (no download or cache needed). Made-with: Cursor
1 parent c99cd5d commit 9f891a0

32 files changed

Lines changed: 28 additions & 28 deletions

.github/workflows/spotbugs.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ jobs:
1313

1414
name: SpotBugs Static Analysis
1515

16-
env:
17-
SPOTBUGS_VERSION: "4.9.3"
18-
1916
steps:
2017
- uses: actions/checkout@v4
2118

@@ -30,23 +27,8 @@ jobs:
3027
mkdir -p ~/vstar_plugins
3128
mkdir -p ~/vstar_plugin_libs
3229
33-
- name: Cache SpotBugs installation
34-
id: cache-spotbugs
35-
uses: actions/cache@v4
36-
with:
37-
path: spotbugs-${{ env.SPOTBUGS_VERSION }}
38-
key: spotbugs-${{ env.SPOTBUGS_VERSION }}
39-
40-
- name: Download SpotBugs
41-
if: steps.cache-spotbugs.outputs.cache-hit != 'true'
42-
run: |
43-
wget -q "https://github.com/spotbugs/spotbugs/releases/download/${SPOTBUGS_VERSION}/spotbugs-${SPOTBUGS_VERSION}.tgz"
44-
tar xzf "spotbugs-${SPOTBUGS_VERSION}.tgz"
45-
4630
- name: Run SpotBugs
47-
run: >
48-
ant -noinput -buildfile build.xml spotbugs
49-
-Dspotbugs.home=${{ github.workspace }}/spotbugs-${{ env.SPOTBUGS_VERSION }}
31+
run: ant -noinput -buildfile build.xml spotbugs
5032

5133
- name: Upload SpotBugs report
5234
if: always()

build.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,12 +503,12 @@
503503

504504
<!-- Static analysis targets -->
505505

506+
<property name="spotbugs.home" location="tools/spotbugs" />
507+
506508
<taskdef resource="edu/umd/cs/findbugs/anttask/tasks.properties"
507-
classpath="${extlib}/spotbugs-ant-4.9.3.jar" />
509+
classpath="${spotbugs.home}/lib/spotbugs-ant.jar" />
508510

509511
<target name="spotbugs" depends="dist" description="Run SpotBugs static analysis">
510-
<fail unless="spotbugs.home"
511-
message="spotbugs.home must be set, e.g. ant spotbugs -Dspotbugs.home=/path/to/spotbugs-4.9.3" />
512512
<property name="spotbugs.report" location="${test_report}/spotbugs" />
513513
<mkdir dir="${spotbugs.report}" />
514514

extlib/ReadMe.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,13 @@ For line and branch coverage reporting, JaCoCo is used.
8080
- jacocoant.jar (0.8.14)
8181
- Eclipse Public License 2.0
8282

83-
For static analysis with SpotBugs, the Ant task jar is included here.
84-
A full SpotBugs installation (4.9.3+) is required and its path must
85-
be provided via -Dspotbugs.home=... when running the Ant target.
86-
See https://spotbugs.github.io for installation.
83+
For static analysis with SpotBugs, the full distribution is bundled
84+
under tools/spotbugs/ and used by the spotbugs Ant target. Run with:
85+
ant spotbugs
8786

88-
o SpotBugs static analysis
87+
o SpotBugs static analysis (4.9.3)
8988
- https://spotbugs.github.io
90-
- spotbugs-ant-4.9.3.jar
89+
- tools/spotbugs/lib/
9190
- GNU Lesser General Public License, version 2.1
9291

9392
For mutation testing, additional libraries are required.
5.34 MB
Binary file not shown.

tools/spotbugs/lib/asm-9.7.1.jar

123 KB
Binary file not shown.
34.3 KB
Binary file not shown.
71.7 KB
Binary file not shown.
50.7 KB
Binary file not shown.
92.3 KB
Binary file not shown.

tools/spotbugs/lib/bcel-6.10.0.jar

723 KB
Binary file not shown.

0 commit comments

Comments
 (0)