Skip to content

Commit

Permalink
Fix build (#1847)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan N. Klug <github@klug.nrw>
  • Loading branch information
J-N-K committed Feb 14, 2023
1 parent 8be6005 commit f2323e6
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 11 deletions.
25 changes: 14 additions & 11 deletions pom.xml
Expand Up @@ -106,19 +106,22 @@
<groupId>org.openhab.tools.sat</groupId>
<artifactId>sat-plugin</artifactId>
<version>${sat.version}</version>
<configuration>
<checkstyleProperties>${basedirRoot}/tools/static-code-analysis/checkstyle/ruleset.properties</checkstyleProperties>
<checkstyleFilter>${basedirRoot}/tools/static-code-analysis/checkstyle/suppressions.xml</checkstyleFilter>
</configuration>
<executions>
<execution>
<id>sat-all</id>
<configuration>
<checkstyleProperties>tools/static-code-analysis/checkstyle/ruleset.properties</checkstyleProperties>
<checkstyleFilter>tools/static-code-analysis/checkstyle/suppressions.xml</checkstyleFilter>
</configuration>
<goals>
<goal>checkstyle</goal>
<goal>pmd</goal>
<goal>spotbugs</goal>
<goal>report</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
<configuration>
<checkstyleProperties>tools/static-code-analysis/checkstyle/ruleset.properties</checkstyleProperties>
<checkstyleFilter>tools/static-code-analysis/checkstyle/suppressions.xml</checkstyleFilter>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -215,15 +218,15 @@
<executions>
<execution>
<id>directories</id>
<phase>none</phase>
<goals>
<goal>directory-of</goal>
</goals>
<phase>initialize</phase>
<configuration>
<property>basedirRoot</property>
<project>
<groupId>org.openhab.addons</groupId>
<artifactId>org.openhab.addons.reactor</artifactId>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.zwave</artifactId>
</project>
</configuration>
</execution>
Expand Down
42 changes: 42 additions & 0 deletions tools/static-code-analysis/spotbugs/suppressions.xml
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<FindBugsFilter>
<!-- Groovy files produce a lot of warnings and will be ignored -->
<Match>
<Source name="~.*\.groovy" />
</Match>
<!-- Excludes all bugs with priority higher than 4 -->
<Match>
<Rank value="4"/>
<Not>
<Bug pattern="SLF4J_LOGGER_SHOULD_BE_NON_STATIC"/>
</Not>
</Match>
<!-- This pattern is not wanted as it reports usage of Throwable.getMessage() as argument to SLF4G logger -->
<Match>
<Bug pattern="SLF4J_MANUALLY_PROVIDED_MESSAGE"/>
</Match>
<!-- Allow util classes to have static loggers -->
<Match>
<Class name="~.*Utils"/>
<Bug pattern="SLF4J_LOGGER_SHOULD_BE_NON_STATIC"/>
</Match>
<Match>
<Class name="~.*Util"/>
<Bug pattern="SLF4J_LOGGER_SHOULD_BE_NON_STATIC"/>
</Match>
<!-- The format string is parameter, it can't be constant -->
<Match>
<Class name="org.openhab.core.model.script.actions.Log"/>
<Bug pattern="SLF4J_FORMAT_SHOULD_BE_CONST"/>
</Match>
<Match>
<Bug pattern="SLF4J_UNKNOWN_ARRAY"/>
</Match>
<Match>
<Bug pattern="SLF4J_SIGN_ONLY_FORMAT"/>
</Match>
<Match>
<!-- see https://github.com/spotbugs/spotbugs/issues/1992 -->
<Bug pattern="SA_LOCAL_SELF_COMPARISON"/>
</Match>
</FindBugsFilter>

0 comments on commit f2323e6

Please sign in to comment.