Skip to content

Commit e90b3f9

Browse files
committed
Add SpotBugs exclusion filter for events and json packages
1 parent 922ec0e commit e90b3f9

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@
9292
<doclint>none</doclint>
9393
</configuration>
9494
</plugin>
95+
<plugin>
96+
<groupId>com.github.spotbugs</groupId>
97+
<artifactId>spotbugs-maven-plugin</artifactId>
98+
<version>4.9.8.2</version>
99+
<configuration>
100+
<excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
101+
</configuration>
102+
</plugin>
95103
</plugins>
96104
</pluginManagement>
97105
<plugins>
@@ -445,6 +453,9 @@
445453
<groupId>com.github.spotbugs</groupId>
446454
<artifactId>spotbugs-maven-plugin</artifactId>
447455
<version>4.9.8.2</version>
456+
<configuration>
457+
<excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
458+
</configuration>
448459
</plugin>
449460
<!-- TODO/FIXME tag tracker -->
450461
<plugin>

spotbugs-exclude.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
SpotBugs exclusion filter for the Copilot SDK.
4+
5+
The 'events' and 'json' packages contain Jackson-deserialized DTOs where
6+
returning mutable internal representations (EI_EXPOSE_REP) and storing
7+
references to mutable objects (EI_EXPOSE_REP2) is intentional and expected.
8+
Making defensive copies would add overhead without meaningful security
9+
benefit for these read-only data transfer objects.
10+
-->
11+
<FindBugsFilter>
12+
<Match>
13+
<Package name="com.github.copilot.sdk.events"/>
14+
<Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2"/>
15+
</Match>
16+
<Match>
17+
<Package name="com.github.copilot.sdk.json"/>
18+
<Bug pattern="EI_EXPOSE_REP,EI_EXPOSE_REP2"/>
19+
</Match>
20+
</FindBugsFilter>

0 commit comments

Comments
 (0)