Skip to content

Commit c3f1a38

Browse files
Fix SpotBugs config to allow running multiple plugins (#256)
Closes #255 --- The semi-colon `;` is being interpreted as a command separator rather than a separator for the plugin list. Changing it to colon `:` fixes the issue.
1 parent 87f46b0 commit c3f1a38

File tree

4 files changed

+71
-3
lines changed

4 files changed

+71
-3
lines changed

examples/tests_and_lints/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ spotbugs_config(
66
fail_on_warning = True,
77
plugin_list = [
88
"@maven//:com_h3xstream_findsecbugs_findsecbugs_plugin",
9+
"@maven//:com_mebigfatguy_sb_contrib_sb_contrib",
910
],
1011
visibility = ["//visibility:public"],
1112
)

examples/tests_and_lints/MODULE.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ maven.install(
3737
"org.junit.platform:junit-platform-reporting:1.8.2",
3838
"com.github.spotbugs:spotbugs:4.7.3",
3939
"com.h3xstream.findsecbugs:findsecbugs-plugin:1.12.0",
40+
"com.mebigfatguy.sb-contrib:sb-contrib:7.6.4",
4041
],
4142
fetch_sources = True,
4243
lock_file = "//:maven_install.json",

examples/tests_and_lints/maven_install.json

+68-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL",
3-
"__INPUT_ARTIFACTS_HASH": -2039795700,
4-
"__RESOLVED_ARTIFACTS_HASH": 995485706,
3+
"__INPUT_ARTIFACTS_HASH": 1135924492,
4+
"__RESOLVED_ARTIFACTS_HASH": -40360662,
55
"conflict_resolution": {
66
"com.google.code.gson:gson:2.8.9": "com.google.code.gson:gson:2.9.1",
77
"com.google.errorprone:error_prone_annotations:2.3.2": "com.google.errorprone:error_prone_annotations:2.11.0"
@@ -98,13 +98,41 @@
9898
},
9999
"version": "1.12.0"
100100
},
101+
"com.mebigfatguy.sb-contrib:sb-contrib": {
102+
"shasums": {
103+
"jar": "2236944beeacaa89a2f2c95cd79b399c06975254c255b3d54251d6f79ae77d3e",
104+
"sources": "c807ff6b7aa16a1e9233febfe3803a556ef585775ffadb750226a4f35fa6d330"
105+
},
106+
"version": "7.6.4"
107+
},
101108
"commons-codec:commons-codec": {
102109
"shasums": {
103110
"jar": "b3e9f6d63a790109bf0d056611fbed1cf69055826defeb9894a71369d246ed63",
104111
"sources": "7019940b2298d333edb946e2db3d10f1caacbbd52bb64e85832cfd0017e049cc"
105112
},
106113
"version": "1.15"
107114
},
115+
"jakarta.activation:jakarta.activation-api": {
116+
"shasums": {
117+
"jar": "8b0a0f52fa8b05c5431921a063ed866efaa41dadf2e3a7ee3e1961f2b0d9645b",
118+
"sources": "e9638b764202c0def1b4d54bd37a984c681b2ed46a548ae94ef3f7e4a4b58a31"
119+
},
120+
"version": "1.2.1"
121+
},
122+
"jakarta.annotation:jakarta.annotation-api": {
123+
"shasums": {
124+
"jar": "85fb03fc054cdf4efca8efd9b6712bbb418e1ab98241c4539c8585bbc23e1b8a",
125+
"sources": "aa27e9291dce4ddbb0aea52a1cbef41c6330b96b0ae387a995ed412b68a3af7c"
126+
},
127+
"version": "1.3.5"
128+
},
129+
"jakarta.xml.bind:jakarta.xml.bind-api": {
130+
"shasums": {
131+
"jar": "69156304079bdeed9fc0ae3b39389f19b3cc4ba4443bc80508995394ead742ea",
132+
"sources": "61ceb3ed35ecf99f1803eac9c4b8f12103c7531952beae38ba53cc727f405532"
133+
},
134+
"version": "2.3.2"
135+
},
108136
"jaxen:jaxen": {
109137
"shasums": {
110138
"jar": "70feef9dd75ad064def05a3ce8975aeba515ee7d1be146d12199c8828a64174c",
@@ -405,6 +433,13 @@
405433
"org.checkerframework:checker-qual",
406434
"org.ow2.asm:asm"
407435
],
436+
"com.mebigfatguy.sb-contrib:sb-contrib": [
437+
"jakarta.annotation:jakarta.annotation-api",
438+
"jakarta.xml.bind:jakarta.xml.bind-api"
439+
],
440+
"jakarta.xml.bind:jakarta.xml.bind-api": [
441+
"jakarta.activation:jakarta.activation-api"
442+
],
408443
"junit:junit": [
409444
"org.hamcrest:hamcrest-core"
410445
],
@@ -653,6 +688,13 @@
653688
"com.h3xstream.findsecbugs.xpath",
654689
"com.h3xstream.findsecbugs.xss"
655690
],
691+
"com.mebigfatguy.sb-contrib:sb-contrib": [
692+
"com.mebigfatguy.fbcontrib",
693+
"com.mebigfatguy.fbcontrib.collect",
694+
"com.mebigfatguy.fbcontrib.debug",
695+
"com.mebigfatguy.fbcontrib.detect",
696+
"com.mebigfatguy.fbcontrib.utils"
697+
],
656698
"commons-codec:commons-codec": [
657699
"org.apache.commons.codec",
658700
"org.apache.commons.codec.binary",
@@ -662,6 +704,22 @@
662704
"org.apache.commons.codec.language.bm",
663705
"org.apache.commons.codec.net"
664706
],
707+
"jakarta.activation:jakarta.activation-api": [
708+
"javax.activation"
709+
],
710+
"jakarta.annotation:jakarta.annotation-api": [
711+
"javax.annotation",
712+
"javax.annotation.security",
713+
"javax.annotation.sql"
714+
],
715+
"jakarta.xml.bind:jakarta.xml.bind-api": [
716+
"javax.xml.bind",
717+
"javax.xml.bind.annotation",
718+
"javax.xml.bind.annotation.adapters",
719+
"javax.xml.bind.attachment",
720+
"javax.xml.bind.helpers",
721+
"javax.xml.bind.util"
722+
],
665723
"jaxen:jaxen": [
666724
"org.jaxen",
667725
"org.jaxen.dom",
@@ -1289,8 +1347,16 @@
12891347
"com.google.truth:truth:jar:sources",
12901348
"com.h3xstream.findsecbugs:findsecbugs-plugin",
12911349
"com.h3xstream.findsecbugs:findsecbugs-plugin:jar:sources",
1350+
"com.mebigfatguy.sb-contrib:sb-contrib",
1351+
"com.mebigfatguy.sb-contrib:sb-contrib:jar:sources",
12921352
"commons-codec:commons-codec",
12931353
"commons-codec:commons-codec:jar:sources",
1354+
"jakarta.activation:jakarta.activation-api",
1355+
"jakarta.activation:jakarta.activation-api:jar:sources",
1356+
"jakarta.annotation:jakarta.annotation-api",
1357+
"jakarta.annotation:jakarta.annotation-api:jar:sources",
1358+
"jakarta.xml.bind:jakarta.xml.bind-api",
1359+
"jakarta.xml.bind:jakarta.xml.bind-api:jar:sources",
12941360
"jaxen:jaxen",
12951361
"jaxen:jaxen:jar:sources",
12961362
"junit:junit",

java/private/spotbugs.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def _spotbugs_impl(ctx):
3131
runfiles.append(exclude_filter)
3232

3333
if plugin_list:
34-
plugin_list_cli_flag = ";".join([plugin.short_path for plugin in plugin_list])
34+
plugin_list_cli_flag = ":".join([plugin.short_path for plugin in plugin_list])
3535
flags.extend(["-pluginList", plugin_list_cli_flag])
3636
runfiles.extend(plugin_list)
3737

0 commit comments

Comments
 (0)