Skip to content

Commit

Permalink
refactor: pmd-6.55.0 rule adjustments (#22)
Browse files Browse the repository at this point in the history
* CloneNotSupportedException removed without replacement (see https://docs.pmd-code.org/pmd-doc-6.55.0/pmd_rules_java_errorprone.html#clonethrowsclonenotsupportedexception)
* InvalidSlf4jMessageFormat renamed to InvalidLogMessageFormat (see https://docs.pmd-code.org/pmd-doc-6.55.0/pmd_rules_java_errorprone.html#invalidslf4jmessageformat)
* BooleanInstantiation, ByteInstantiation, IntegerInstantiation, LongInstantiation, and ShortInstantiation replaced by PrimitiveWrapperInstantiation (see, for instance, https://docs.pmd-code.org/pmd-doc-6.55.0/pmd_rules_java_performance.html#booleaninstantiation)
  • Loading branch information
soloturn authored Oct 15, 2023
1 parent d9c4fc5 commit c043842
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pmd/pmd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@

<rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP" />
<rule ref="category/java/bestpractices.xml/CheckResultSet" />
<rule ref="category/java/bestpractices.xml/PrimitiveWrapperInstantiation" />

<rule ref="category/java/codestyle.xml/ExtendsObject" />
<rule ref="category/java/codestyle.xml/ForLoopShouldBeWhileLoop" />

<rule ref="category/java/performance.xml/BigIntegerInstantiation" />
<rule ref="category/java/performance.xml/BooleanInstantiation" />

<rule ref="category/java/design.xml/CollapsibleIfStatements" />
<rule ref="category/java/design.xml/SimplifiedTernary" />
Expand All @@ -43,7 +43,6 @@
<rule ref="category/java/errorprone.xml/CloneMethodMustBePublic" />
<rule ref="category/java/errorprone.xml/CloneMethodMustImplementCloneable" />
<rule ref="category/java/errorprone.xml/CloneMethodReturnTypeMustMatchClassName" />
<rule ref="category/java/errorprone.xml/CloneThrowsCloneNotSupportedException" />
<rule ref="category/java/errorprone.xml/ProperCloneImplementation" />
<!-- inline <rule ref="rulesets/java/finalizers.xml"/>-->
<rule ref="category/java/errorprone.xml/AvoidCallingFinalize" />
Expand All @@ -55,7 +54,7 @@
<!-- inline <rule ref="rulesets/java/logging-java.xml">-->
<!-- <exclude name="GuardLogStatementJavaUtil"/>-->
<!-- </rule>-->
<rule ref="category/java/errorprone.xml/InvalidSlf4jMessageFormat" />
<rule ref="category/java/errorprone.xml/InvalidLogMessageFormat" />
<rule ref="category/java/errorprone.xml/MoreThanOneLogger" />
<rule ref="category/java/errorprone.xml/ProperLogger" />

Expand All @@ -77,10 +76,6 @@
<rule ref="category/java/bestpractices.xml/ReplaceHashtableWithMap" />
<rule ref="category/java/bestpractices.xml/ReplaceVectorWithList" />

<rule ref="category/java/performance.xml/ByteInstantiation" />
<rule ref="category/java/performance.xml/IntegerInstantiation" />
<rule ref="category/java/performance.xml/LongInstantiation" />
<rule ref="category/java/performance.xml/ShortInstantiation" />
<!-- inline <rule ref="rulesets/java/sunsecure.xml"/>-->
<rule ref="category/java/bestpractices.xml/ArrayIsStoredDirectly" />
<rule ref="category/java/bestpractices.xml/MethodReturnsInternalArray" />
Expand Down

0 comments on commit c043842

Please sign in to comment.