Skip to content

Commit 4ebf84d

Browse files
committed
Updated to PMD 7.18
https://github.com/pmd/pmd/releases/tag/pmd_releases%2F7.18.0 Reasoning: * Newly included/Changed * `IdenticalConditionalBranches` → self explaining * `LabeledStatement` → are confusing to use and I barely ever see them * Not included * `UnusedLabel` → Not used because `LabeledStatement` already handles these * `ConfusingTernary` → Not helpful in most situations * `AvoidCatchingGenericException` → Might be ok for maybe Throwable or Error (but we sometimes also have to catch those), however not catching Exceptions and RuntimeExceptions is an extremely bad practice
1 parent 8083575 commit 4ebf84d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.config/pmd/java/ruleset.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP"/>
1818
<rule ref="category/java/bestpractices.xml/ConstantsInInterface"/>
1919
<rule ref="category/java/bestpractices.xml/ExhaustiveSwitchHasDefault"/>
20+
<rule ref="category/java/bestpractices.xml/LabeledStatement"/>
2021
<rule ref="category/java/bestpractices.xml/LiteralsFirstInComparisons"/>
2122
<!-- CheckStyle can't handle this switch behavior -> delegated to PMD -->
2223
<rule ref="category/java/bestpractices.xml/NonExhaustiveSwitch"/>
@@ -149,6 +150,7 @@
149150
<rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices"/>
150151
<rule ref="category/java/errorprone.xml/EqualsNull"/>
151152
<rule ref="category/java/errorprone.xml/IdempotentOperations"/>
153+
<rule ref="category/java/errorprone.xml/IdenticalConditionalBranches"/>
152154
<rule ref="category/java/errorprone.xml/ImplicitSwitchFallThrough"/>
153155
<rule ref="category/java/errorprone.xml/InstantiationToGetClass"/>
154156
<rule ref="category/java/errorprone.xml/InvalidLogMessageFormat"/>

0 commit comments

Comments
 (0)