Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Added another spotbugs plugins #135

Merged
merged 1 commit into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ dependencies {
errorprone("jp.skypencil.errorprone.slf4j:errorprone-slf4j:0.1.20")

spotbugsPlugins("jp.skypencil.findbugs.slf4j:bug-pattern:1.5.0")
spotbugsPlugins("com.h3xstream.findsecbugs:findsecbugs-plugin:1.12.0")
spotbugsPlugins("com.mebigfatguy.sb-contrib:sb-contrib:7.6.3")
}

java {
Expand Down
8 changes: 8 additions & 0 deletions config/spotbugs/exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,12 @@
<Match>
<Bug pattern="SLF4J_LOGGER_SHOULD_BE_NON_STATIC"/>
</Match>
<Match>
<Bug pattern="PDP_POORLY_DEFINED_PARAMETER"/>
<Class name="io.github.mfvanek.pg.spring.AutoConfigurationTestBase"/>
</Match>
<Match>
<Bug pattern="EXS_EXCEPTION_SOFTENING_NO_CONSTRAINTS"/>
<Class name="io.github.mfvanek.pg.spring.DatabaseStructureHealthAutoConfiguration"/>
</Match>
</FindBugsFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,11 @@ public DatabaseStructureHealthProperties(@DefaultValue("true") final boolean ena
public boolean isEnabled() {
return enabled;
}

@Override
public String toString() {
return DatabaseStructureHealthProperties.class.getSimpleName() + '{' +
"enabled=" + enabled +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ void getterShouldWork() {
final DatabaseStructureHealthProperties propertiesEnabled = new DatabaseStructureHealthProperties(true);
assertThat(propertiesEnabled.isEnabled())
.isTrue();
assertThat(propertiesEnabled)
.hasToString("DatabaseStructureHealthProperties{enabled=true}");

final DatabaseStructureHealthProperties propertiesDisabled = new DatabaseStructureHealthProperties(false);
assertThat(propertiesDisabled.isEnabled())
.isFalse();
assertThat(propertiesDisabled)
.hasToString("DatabaseStructureHealthProperties{enabled=false}");
}
}
Loading