rulesets.java.design.xml Maven / Gradle / Ivy
<?xml version="1.0"?> <ruleset name="Design" 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> The Design ruleset contains rules that flag suboptimal code implementations. Alternate approaches are suggested. </description> <!-- Rules, that have been moved into a category --> <rule ref="category/java/design.xml/AbstractClassWithoutAnyMethod" deprecated="true" /> <rule ref="category/java/design.xml/AvoidDeeplyNestedIfStmts" deprecated="true" /> <rule ref="category/java/design.xml/ClassWithOnlyPrivateConstructorsShouldBeFinal" deprecated="true" /> <rule ref="category/java/design.xml/DataClass" deprecated="true" /> <rule ref="category/java/design.xml/FinalFieldCouldBeStatic" deprecated="true" /> <rule ref="category/java/design.xml/GodClass" deprecated="true" /> <rule ref="category/java/design.xml/ImmutableField" deprecated="true" /> <rule ref="category/java/design.xml/LogicInversion" deprecated="true" /> <rule ref="category/java/design.xml/SimplifyBooleanExpressions" deprecated="true" /> <rule ref="category/java/design.xml/SimplifyBooleanReturns" deprecated="true" /> <rule ref="category/java/design.xml/SimplifyConditional" deprecated="true" /> <rule ref="category/java/design.xml/SingularField" deprecated="true" /> <rule ref="category/java/design.xml/SwitchDensity" deprecated="true" /> <rule ref="category/java/design.xml/UseUtilityClass" deprecated="true" /> <rule ref="category/java/errorprone.xml/AssignmentToNonFinalStatic" deprecated="true" /> <rule ref="category/java/errorprone.xml/AvoidInstanceofChecksInCatchClause" deprecated="true" /> <!-- <rule ref="category/java/errorprone.xml/BadComparison" deprecated="true" />--> <rule ref="category/java/errorprone.xml/CloseResource" deprecated="true" /> <rule ref="category/java/errorprone.xml/CompareObjectsWithEquals" deprecated="true" /> <rule ref="category/java/errorprone.xml/ConstructorCallsOverridableMethod" deprecated="true" /> <rule ref="category/java/errorprone.xml/EqualsNull" deprecated="true" /> <rule ref="category/java/errorprone.xml/IdempotentOperations" deprecated="true" /> <rule ref="category/java/errorprone.xml/InstantiationToGetClass" deprecated="true" /> <!-- <rule ref="category/java/errorprone.xml/MissingBreakInSwitch" deprecated="true" />--> <rule ref="category/java/errorprone.xml/MissingStaticMethodInNonInstantiatableClass" deprecated="true" /> <rule ref="category/java/errorprone.xml/NonCaseLabelInSwitchStatement" deprecated="true" /> <rule ref="category/java/errorprone.xml/NonStaticInitializer" deprecated="true" /> <!-- <rule ref="category/java/errorprone.xml/ReturnEmptyArrayRatherThanNull" deprecated="true" />--> <rule ref="category/java/errorprone.xml/SimpleDateFormatNeedsLocale" deprecated="true" /> <rule ref="category/java/errorprone.xml/SingleMethodSingleton" deprecated="true" /> <rule ref="category/java/errorprone.xml/SingletonClassReturningNewInstance" deprecated="true" /> <rule ref="category/java/errorprone.xml/UseLocaleWithCaseConversions" deprecated="true" /> <rule ref="category/java/codestyle.xml/AvoidProtectedFieldInFinalClass" deprecated="true" /> <rule ref="category/java/codestyle.xml/AvoidProtectedMethodInFinalClassNotExtending" deprecated="true" /> <rule ref="category/java/codestyle.xml/ConfusingTernary" deprecated="true" /> <rule ref="category/java/codestyle.xml/EmptyMethodInAbstractClassShouldBeAbstract" deprecated="true" /> <rule ref="category/java/codestyle.xml/FieldDeclarationsShouldBeAtStartOfClass" deprecated="true" /> <rule ref="category/java/codestyle.xml/UnnecessaryLocalBeforeReturn" deprecated="true" /> <rule ref="category/java/multithreading.xml/AvoidSynchronizedAtMethodLevel" deprecated="true" /> <rule ref="category/java/multithreading.xml/NonThreadSafeSingleton" deprecated="true" /> <rule ref="category/java/multithreading.xml/UseNotifyAllInsteadOfNotify" deprecated="true" /> <rule ref="category/java/bestpractices.xml/AbstractClassWithoutAbstractMethod" deprecated="true" /> <rule ref="category/java/bestpractices.xml/AccessorClassGeneration" deprecated="true" /> <rule ref="category/java/bestpractices.xml/AccessorMethodGeneration" deprecated="true" /> <rule ref="category/java/bestpractices.xml/AvoidReassigningParameters" deprecated="true" /> <rule ref="category/java/bestpractices.xml/ConstantsInInterface" deprecated="true" /> <rule ref="category/java/bestpractices.xml/DefaultLabelNotLastInSwitchStmt" deprecated="true" /> <rule ref="category/java/bestpractices.xml/PreserveStackTrace" deprecated="true" /> <rule ref="category/java/bestpractices.xml/SwitchStmtsShouldHaveDefault" deprecated="true" /> <rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty" deprecated="true" /> <rule ref="category/java/bestpractices.xml/UseVarargs" deprecated="true" /> <rule ref="category/java/performance.xml/OptimizableToArrayCall" deprecated="true" /> <rule ref="category/java/performance.xml/TooFewBranchesForASwitchStatement" deprecated="true" /> <rule ref="category/java/documentation.xml/UncommentedEmptyConstructor" deprecated="true" /> <rule ref="category/java/documentation.xml/UncommentedEmptyMethodBody" deprecated="true" /> </ruleset>