Updated dependencies and cleanup.
This commit is contained in:
parent
aa8fadd37c
commit
4a701e1ee0
20 changed files with 321 additions and 117 deletions
|
@ -1,26 +1,38 @@
|
|||
<?xml version="1.0"?>
|
||||
<!--
|
||||
~ pmd.xml
|
||||
~
|
||||
~ Copyright (c) 2010-2020, Erik C. Thauvin (erik@thauvin.net)
|
||||
~ All rights reserved.
|
||||
-->
|
||||
|
||||
<ruleset name="erik"
|
||||
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 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
|
||||
<description>Erik's Ruleset</description>
|
||||
<!-- BEST PRACTICES -->
|
||||
<rule ref="category/java/bestpractices.xml/AvoidStringBufferField"/>
|
||||
<!-- <rule ref="category/java/bestpractices.xml/AvoidStringBufferField"/>-->
|
||||
<rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP"/>
|
||||
<rule ref="category/java/bestpractices.xml/CheckResultSet"/>
|
||||
<rule ref="category/java/bestpractices.xml/ConstantsInInterface"/>
|
||||
<rule ref="category/java/bestpractices.xml/DefaultLabelNotLastInSwitchStmt"/>
|
||||
<rule ref="category/java/bestpractices.xml/ForLoopCanBeForeach"/>
|
||||
<rule ref="category/java/bestpractices.xml/GuardLogStatement"/>
|
||||
<rule ref="category/java/bestpractices.xml/LooseCoupling"/>
|
||||
<!-- <rule ref="category/java/bestpractices.xml/LooseCoupling"/> -->
|
||||
<rule ref="category/java/bestpractices.xml/MethodReturnsInternalArray"/>
|
||||
<rule ref="category/java/bestpractices.xml/MissingOverride"/>
|
||||
<rule ref="category/java/bestpractices.xml/MissingOverride">
|
||||
<properties>
|
||||
<property name="violationSuppressXPath"
|
||||
value="./MethodDeclarator[@Image='hashCode' or @Image='equals' or @Image='toString']"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="category/java/bestpractices.xml/PositionLiteralsFirstInCaseInsensitiveComparisons"/>
|
||||
<rule ref="category/java/bestpractices.xml/PositionLiteralsFirstInComparisons"/>
|
||||
<rule ref="category/java/bestpractices.xml/PreserveStackTrace"/>
|
||||
<rule ref="category/java/bestpractices.xml/ReplaceEnumerationWithIterator"/>
|
||||
<rule ref="category/java/bestpractices.xml/ReplaceHashtableWithMap"/>
|
||||
<rule ref="category/java/bestpractices.xml/ReplaceVectorWithList"/>
|
||||
<!-- <rule ref="category/java/bestpractices.xml/ReplaceHashtableWithMap"/>
|
||||
<rule ref="category/java/bestpractices.xml/ReplaceVectorWithList"/> -->
|
||||
<rule ref="category/java/bestpractices.xml/SwitchStmtsShouldHaveDefault"/>
|
||||
<rule ref="category/java/bestpractices.xml/SystemPrintln"/>
|
||||
<rule ref="category/java/bestpractices.xml/UnusedFormalParameter"/>
|
||||
|
@ -41,7 +53,7 @@
|
|||
<rule ref="category/java/codestyle.xml/GenericsNaming"/>
|
||||
<rule ref="category/java/codestyle.xml/LocalVariableNamingConventions"/>
|
||||
<rule ref="category/java/codestyle.xml/MethodNamingConventions"/>
|
||||
<rule ref="category/java/codestyle.xml/PackageCase"/>
|
||||
<!-- <rule ref="category/java/codestyle.xml/PackageCase"/>-->
|
||||
|
||||
|
||||
<!-- OTHER -->
|
||||
|
@ -84,7 +96,7 @@
|
|||
<rule ref="category/java/design.xml/DataClass"/>
|
||||
<rule ref="category/java/design.xml/DoNotExtendJavaLangError"/>
|
||||
<rule ref="category/java/design.xml/ExceptionAsFlowControl"/>
|
||||
<rule ref="category/java/design.xml/ExcessivePublicCount"/>
|
||||
<!-- <rule ref="category/java/design.xml/ExcessivePublicCount"/>-->
|
||||
<rule ref="category/java/design.xml/FinalFieldCouldBeStatic"/>
|
||||
<rule ref="category/java/design.xml/ImmutableField"/>
|
||||
<rule ref="category/java/design.xml/LogicInversion"/>
|
||||
|
@ -108,6 +120,8 @@
|
|||
<rule ref="category/java/errorprone.xml/AssignmentInOperand">
|
||||
<properties>
|
||||
<property name="allowWhile" value="true"/>
|
||||
<property name="allowFor" value="true"/>
|
||||
<property name="allowIf" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="category/java/errorprone.xml/AssignmentToNonFinalStatic"/>
|
||||
|
@ -117,7 +131,11 @@
|
|||
<rule ref="category/java/errorprone.xml/AvoidCallingFinalize"/>
|
||||
<rule ref="category/java/errorprone.xml/AvoidCatchingThrowable"/>
|
||||
<rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor"/>
|
||||
<rule ref="category/java/errorprone.xml/AvoidDuplicateLiterals"/>
|
||||
<rule ref="category/java/errorprone.xml/AvoidDuplicateLiterals">
|
||||
<properties>
|
||||
<property name="skipAnnotations" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="category/java/errorprone.xml/AvoidEnumAsIdentifier"/>
|
||||
<rule ref="category/java/errorprone.xml/AvoidInstanceofChecksInCatchClause"/>
|
||||
<rule ref="category/java/errorprone.xml/AvoidLosingExceptionInformation"/>
|
||||
|
@ -150,11 +168,10 @@
|
|||
<rule ref="category/java/errorprone.xml/IdempotentOperations"/>
|
||||
<rule ref="category/java/errorprone.xml/ImportFromSamePackage"/>
|
||||
<rule ref="category/java/errorprone.xml/InstantiationToGetClass"/>
|
||||
<rule ref="category/java/errorprone.xml/InvalidSlf4jMessageFormat"/>
|
||||
<rule ref="category/java/errorprone.xml/InvalidLogMessageFormat"/>
|
||||
<rule ref="category/java/errorprone.xml/JumbledIncrementer"/>
|
||||
<rule ref="category/java/errorprone.xml/JUnitSpelling"/>
|
||||
<rule ref="category/java/errorprone.xml/JUnitStaticSuite"/>
|
||||
<rule ref="category/java/errorprone.xml/LoggerIsNotStaticFinal"/>
|
||||
<rule ref="category/java/errorprone.xml/MethodWithSameNameAsEnclosingClass"/>
|
||||
<rule ref="category/java/errorprone.xml/MisplacedNullCheck"/>
|
||||
<rule ref="category/java/errorprone.xml/MissingBreakInSwitch"/>
|
||||
|
@ -163,7 +180,7 @@
|
|||
<rule ref="category/java/errorprone.xml/MoreThanOneLogger"/>
|
||||
<rule ref="category/java/errorprone.xml/NonCaseLabelInSwitchStatement"/>
|
||||
<rule ref="category/java/errorprone.xml/NonStaticInitializer"/>
|
||||
<rule ref="category/java/errorprone.xml/NullAssignment"/>
|
||||
<!-- <rule ref="category/java/errorprone.xml/NullAssignment"/>-->
|
||||
<rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashcode"/>
|
||||
<rule ref="category/java/errorprone.xml/ProperCloneImplementation"/>
|
||||
<rule ref="category/java/errorprone.xml/ProperLogger"/>
|
||||
|
@ -241,7 +258,7 @@
|
|||
<rule ref="category/java/performance.xml/StringToString"/>
|
||||
<rule ref="category/java/performance.xml/TooFewBranchesForASwitchStatement"/>
|
||||
<rule ref="category/java/performance.xml/UnnecessaryWrapperObjectCreation"/>
|
||||
<rule ref="category/java/performance.xml/UseArrayListInsteadOfVector"/>
|
||||
<!-- <rule ref="category/java/performance.xml/UseArrayListInsteadOfVector"/> -->
|
||||
<rule ref="category/java/performance.xml/UseArraysAsList"/>
|
||||
<rule ref="category/java/performance.xml/UseIndexOfChar"/>
|
||||
<rule ref="category/java/performance.xml/UselessStringValueOf"/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue