Skip to content

Commit

Permalink
fix spotbugs for multiple modules - multiple spotbugs files
Browse files Browse the repository at this point in the history
  • Loading branch information
eldimi committed Nov 9, 2023
1 parent d71f9ac commit a9ef2c4
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 75 deletions.
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@
<junit.version>5.10.0</junit.version>
<aws-embedded-metrics.version>1.0.6</aws-embedded-metrics.version>
<jmespath.version>0.5.1</jmespath.version>
<parentproject.basedir>${project.basedir}</parentproject.basedir>
</properties>

<distributionManagement>
Expand Down Expand Up @@ -509,7 +508,7 @@
</executions>
<configuration>
<xmlOutput>true</xmlOutput>
<excludeFilterFile>${parentproject.basedir}/spotbugs-exclude.xml</excludeFilterFile>
<excludeFilterFile>../spotbugs-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
</plugins>
Expand Down
4 changes: 0 additions & 4 deletions powertools-batch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@

<artifactId>powertools-batch</artifactId>

<properties>
<parentproject.basedir>${project.parent.basedir}</parentproject.basedir>
</properties>

<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
Expand Down
4 changes: 0 additions & 4 deletions powertools-cloudformation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@
</snapshotRepository>
</distributionManagement>

<properties>
<parentproject.basedir>${project.parent.basedir}</parentproject.basedir>
</properties>

<dependencies>
<dependency>
<groupId>software.amazon.awssdk</groupId>
Expand Down
4 changes: 0 additions & 4 deletions powertools-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@
</snapshotRepository>
</distributionManagement>

<properties>
<parentproject.basedir>${project.parent.basedir}</parentproject.basedir>
</properties>

<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
Expand Down
1 change: 0 additions & 1 deletion powertools-e2e-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
<maven.compiler.target>1.8</maven.compiler.target>
<constructs.version>10.3.0</constructs.version>
<cdk.version>2.100.0</cdk.version>
<parentproject.basedir>${project.parent.basedir}</parentproject.basedir>
</properties>

<dependencies>
Expand Down
4 changes: 0 additions & 4 deletions powertools-idempotency/powertools-idempotency-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@
Idempotency module common implementation
</description>

<properties>
<parentproject.basedir>${project.parent.parent.basedir}</parentproject.basedir>
</properties>

<dependencies>
<dependency>
<groupId>software.amazon.lambda</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@
DynamoDB implementation for the idempotency module
</description>

<properties>
<parentproject.basedir>${project.parent.parent.basedir}</parentproject.basedir>
</properties>

<dependencies>
<dependency>
<groupId>software.amazon.lambda</groupId>
Expand Down
46 changes: 46 additions & 0 deletions powertools-idempotency/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!-- This file specifies a spotbugs filter for excluding reports that
should not be considered errors.
The format of this file is documented at:
https://spotbugs.readthedocs.io/en/latest/filter.html
When possible, please specify the full names of the bug codes,
using the pattern attribute, to make it clearer what reports are
being suppressed. You can find a listing of codes at:
https://spotbugs.readthedocs.io/en/latest/bugDescriptions.html
-->
<FindBugsFilter>
<!-- Internals of Log event for apache log4j-->
<Match>
<Bug pattern="EI_EXPOSE_REP"/>
<Or>
<And>
<Class name="software.amazon.lambda.powertools.idempotency.Idempotency"/>
<Method name="getPersistenceStore"/>
</And>
<And>
<Class name="software.amazon.lambda.powertools.idempotency.Idempotency"/>
<Method name="getConfig"/>
</And>
</Or>
</Match>
<Match>
<Bug pattern="EI_EXPOSE_REP2"/>
<Or>
<And>
<Class name="software.amazon.lambda.powertools.idempotency.Idempotency$Config"/>
<Field name="store"/>
</And>
<And>
<Class name="software.amazon.lambda.powertools.idempotency.Idempotency$Config"/>
<Field name="config"/>
</And>
<And>
<Class name="software.amazon.lambda.powertools.idempotency.internal.IdempotencyHandler"/>
<Field name="pjp"/>
</And>
<And>
<Class name="software.amazon.lambda.powertools.idempotency.persistence.dynamodb.DynamoDBPersistenceStore$Builder"/>
<Field name="dynamoDbClient"/>
</And>
</Or>
</Match>
</FindBugsFilter>
4 changes: 0 additions & 4 deletions powertools-large-messages/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@
</snapshotRepository>
</distributionManagement>

<properties>
<parentproject.basedir>${project.parent.basedir}</parentproject.basedir>
</properties>

<dependencies>
<dependency>
<groupId>software.amazon.lambda</groupId>
Expand Down
4 changes: 0 additions & 4 deletions powertools-logging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@
</snapshotRepository>
</distributionManagement>

<properties>
<parentproject.basedir>${project.parent.basedir}</parentproject.basedir>
</properties>

<dependencies>
<dependency>
<groupId>software.amazon.lambda</groupId>
Expand Down
4 changes: 0 additions & 4 deletions powertools-metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@
</snapshotRepository>
</distributionManagement>

<properties>
<parentproject.basedir>${project.parent.basedir}</parentproject.basedir>
</properties>

<dependencies>
<dependency>
<groupId>software.amazon.lambda</groupId>
Expand Down
4 changes: 0 additions & 4 deletions powertools-parameters/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@
</snapshotRepository>
</distributionManagement>

<properties>
<parentproject.basedir>${project.parent.basedir}</parentproject.basedir>
</properties>

<dependencies>
<dependency>
<groupId>software.amazon.lambda</groupId>
Expand Down
4 changes: 0 additions & 4 deletions powertools-serialization/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@
</snapshotRepository>
</distributionManagement>

<properties>
<parentproject.basedir>${project.parent.basedir}</parentproject.basedir>
</properties>

<dependencies>
<dependency>
<groupId>io.burt</groupId>
Expand Down
4 changes: 0 additions & 4 deletions powertools-tracing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@
</snapshotRepository>
</distributionManagement>

<properties>
<parentproject.basedir>${project.parent.basedir}</parentproject.basedir>
</properties>

<dependencies>
<dependency>
<groupId>software.amazon.lambda</groupId>
Expand Down
4 changes: 0 additions & 4 deletions powertools-validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@
</snapshotRepository>
</distributionManagement>

<properties>
<parentproject.basedir>${project.parent.basedir}</parentproject.basedir>
</properties>

<dependencies>
<dependency>
<groupId>software.amazon.lambda</groupId>
Expand Down
24 changes: 0 additions & 24 deletions spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@
<Class name="software.amazon.lambda.powertools.logging.internal.AbstractJacksonLayoutCopy$LogEventWithAdditionalFields"/>
<Method name="getAdditionalFields"/>
</And>
<And>
<Class name="software.amazon.lambda.powertools.idempotency.Idempotency"/>
<Method name="getPersistenceStore"/>
</And>
<And>
<Class name="software.amazon.lambda.powertools.idempotency.Idempotency"/>
<Method name="getConfig"/>
</And>
<And>
<Class name="software.amazon.lambda.powertools.largemessages.LargeMessageConfig"/>
<Method name="getS3Client"/>
Expand Down Expand Up @@ -73,22 +65,6 @@
<Class name="software.amazon.lambda.powertools.parameters.transform.TransformationManager"/>
<Field name="transformer"/>
</And>
<And>
<Class name="software.amazon.lambda.powertools.idempotency.Idempotency$Config"/>
<Field name="store"/>
</And>
<And>
<Class name="software.amazon.lambda.powertools.idempotency.Idempotency$Config"/>
<Field name="config"/>
</And>
<And>
<Class name="software.amazon.lambda.powertools.idempotency.internal.IdempotencyHandler"/>
<Field name="pjp"/>
</And>
<And>
<Class name="software.amazon.lambda.powertools.idempotency.persistence.dynamodb.DynamoDBPersistenceStore$Builder"/>
<Field name="dynamoDbClient"/>
</And>
<And>
<Class name="software.amazon.lambda.powertools.utilities.EventDeserializer$EventPart"/>
<Field name="contentMap"/>
Expand Down

0 comments on commit a9ef2c4

Please sign in to comment.