Aktualisierung der PMD / Spotbugs Konfiguration.

This commit is contained in:
Konrad Neitzel
2022-08-13 16:56:28 +02:00
parent 675de7d70b
commit ce9e0f96b2
3 changed files with 50 additions and 6 deletions
+28 -6
View File
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="Custom Java Ruleset"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
<description>
Custom ruleset for Java
@@ -14,11 +14,26 @@
<exclude name="SystemPrintln" />
</rule>
<rule ref="category/java/codestyle.xml" />
<rule ref="category/java/codestyle.xml">
<!-- That is not my code style! -->
<exclude name="AtLeastOneConstructor" />
<rule ref="category/java/design.xml" />
<!-- long variables are acceptable -->
<exclude name="LongVariable"/>
<rule ref="category/java/documentation.xml" />
<!-- Multiple return statements are ok -->
<exclude name="OnlyOneReturn"/>
</rule>
<rule ref="category/java/design.xml">
<!-- Problems with builder and streams/lambdas -->
<exclude name="LawOfDemeter" />
</rule>
<rule ref="category/java/documentation.xml">
<!-- Long comments are not a problem! -->
<exclude name="CommentSize"/>
</rule>
<rule ref="category/java/errorprone.xml" />
@@ -28,4 +43,11 @@
<rule ref="category/java/security.xml" />
<rule ref="category/java/design.xml/LoosePackageCoupling">
<properties>
<property name="packages">
<value>de.kneitzel</value>
</property>
</properties>
</rule>
</ruleset>