Remove old rulesets

These were from PMD 5. In PMD 6, these rules
have been moved into categories.
This commit is contained in:
Andreas Dangel 2024-01-11 12:23:05 +01:00
parent 2e7263af69
commit 9977c0ffeb
No known key found for this signature in database
GPG Key ID: 93450DF2DF9A3FA3
66 changed files with 1 additions and 1369 deletions

View File

@ -1,14 +0,0 @@
<?xml version="1.0"?>
<ruleset name="ApexUnit"
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>
These rules deal with different problems that can occur with Apex unit tests.
</description>
<rule ref="category/apex/bestpractices.xml/ApexUnitTestClassShouldHaveAsserts" deprecated="true" />
<rule ref="category/apex/bestpractices.xml/ApexUnitTestShouldNotUseSeeAllDataTrue" deprecated="true" />
</ruleset>

View File

@ -1,16 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Braces"
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 Braces ruleset contains rules regarding the use and placement of braces.
</description>
<rule ref="category/apex/codestyle.xml/ForLoopsMustUseBraces" deprecated="true" />
<rule ref="category/apex/codestyle.xml/IfElseStmtsMustUseBraces" deprecated="true" />
<rule ref="category/apex/codestyle.xml/IfStmtsMustUseBraces" deprecated="true" />
<rule ref="category/apex/codestyle.xml/WhileLoopsMustUseBraces" deprecated="true" />
</ruleset>

View File

@ -1,21 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Complexity" 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 Complexity ruleset contains rules that find problems related to code size or complexity.
</description>
<rule ref="category/apex/design.xml/AvoidDeeplyNestedIfStmts" deprecated="true" />
<rule ref="category/apex/design.xml/ExcessiveClassLength" deprecated="true" />
<rule ref="category/apex/design.xml/ExcessiveParameterList" deprecated="true" />
<rule ref="category/apex/design.xml/ExcessivePublicCount" deprecated="true" />
<rule ref="category/apex/design.xml/NcssConstructorCount" deprecated="true" />
<rule ref="category/apex/design.xml/NcssMethodCount" deprecated="true" />
<rule ref="category/apex/design.xml/NcssTypeCount" deprecated="true" />
<rule ref="category/apex/design.xml/StdCyclomaticComplexity" deprecated="true" />
<rule ref="category/apex/design.xml/TooManyFields" deprecated="true" />
</ruleset>

View File

@ -1,18 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Empty Code"
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 Empty Code ruleset contains rules that find empty statements of any kind (empty method,
empty block statement, empty try or catch block,...).
</description>
<rule ref="category/apex/errorprone.xml/EmptyCatchBlock" deprecated="true" />
<rule ref="category/apex/errorprone.xml/EmptyIfStmt" deprecated="true" />
<rule ref="category/apex/errorprone.xml/EmptyStatementBlock" deprecated="true" />
<rule ref="category/apex/errorprone.xml/EmptyTryOrFinallyBlock" deprecated="true" />
<rule ref="category/apex/errorprone.xml/EmptyWhileStmt" deprecated="true" />
</ruleset>

View File

@ -1,13 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Metrics temporary 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 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
<description>
These are rules which use the Metrics Framework to calculate metrics.
</description>
<rule ref="category/apex/design.xml/CyclomaticComplexity" deprecated="true" />
</ruleset>

View File

@ -1,15 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Performance"
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 Performance ruleset contains a collection of good practices which should be followed.
</description>
<rule ref="category/apex/performance.xml/AvoidDmlStatementsInLoops" deprecated="true" />
<rule ref="category/apex/performance.xml/AvoidSoqlInLoops" deprecated="true" />
<rule ref="category/apex/performance.xml/AvoidSoslInLoops" deprecated="true" />
</ruleset>

View File

@ -1,54 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ruleset xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Default ruleset used by the CodeClimate Engine for Salesforce.com Apex" xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
<description>
Default ruleset used by the Code Climate Engine for Salesforce.com Apex
Note: This ruleset is deprecated. Use "rulesets/apex/quickstart.xml" instead.
</description>
<rule ref="rulesets/apex/quickstart.xml/ExcessiveClassLength" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ExcessiveParameterList" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ExcessivePublicCount" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/NcssConstructorCount" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/NcssMethodCount" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/NcssTypeCount" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/StdCyclomaticComplexity" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/TooManyFields" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/AvoidDeeplyNestedIfStmts" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/CyclomaticComplexity" deprecated="true" />
<rule ref="category/apex/performance.xml/AvoidSoqlInLoops" deprecated="true" />
<rule ref="category/apex/performance.xml/AvoidSoslInLoops" deprecated="true" />
<rule ref="category/apex/performance.xml/AvoidDmlStatementsInLoops" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/AvoidDirectAccessTriggerMap" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/AvoidLogicInTrigger" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/AvoidGlobalModifier" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/AvoidNonExistentAnnotations" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/AvoidHardcodingId" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ClassNamingConventions" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/MethodNamingConventions" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/MethodWithSameNameAsEnclosingClass" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ApexUnitTestClassShouldHaveAsserts" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ApexUnitTestShouldNotUseSeeAllDataTrue" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ApexSharingViolations" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ApexInsecureEndpoint" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ApexCSRF" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ApexOpenRedirect" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ApexSOQLInjection" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ApexXSSFromURLParam" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ApexXSSFromEscapeFalse" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ApexBadCrypto" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ApexCRUDViolation" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ApexDangerousMethods" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ApexSuggestUsingNamedCred" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/IfStmtsMustUseBraces" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/WhileLoopsMustUseBraces" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/IfElseStmtsMustUseBraces" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ForLoopsMustUseBraces" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/EmptyCatchBlock" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/EmptyIfStmt" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/EmptyWhileStmt" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/EmptyTryOrFinallyBlock" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/EmptyStatementBlock" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/OneDeclarationPerLine" deprecated="true" />
<rule ref="rulesets/apex/quickstart.xml/ApexDoc" deprecated="true" />
</ruleset>

View File

@ -1,11 +0,0 @@
#
# BSD-style license; for more info see http://pmd.sourceforge.net/license.html
#
rulesets.filenames=\
category/apex/bestpractices.xml,\
category/apex/codestyle.xml,\
category/apex/design.xml,\
category/apex/documentation.xml,\
category/apex/errorprone.xml,\
category/apex/performance.xml,\
category/apex/security.xml

View File

@ -1,23 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Security" 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>
These rules deal with different security problems that can occur within Apex.
</description>
<rule ref="category/apex/security.xml/ApexBadCrypto" deprecated="true" />
<rule ref="category/apex/security.xml/ApexCRUDViolation" deprecated="true" />
<rule ref="category/apex/errorprone.xml/ApexCSRF" deprecated="true" />
<rule ref="category/apex/security.xml/ApexDangerousMethods" deprecated="true" />
<rule ref="category/apex/security.xml/ApexInsecureEndpoint" deprecated="true" />
<rule ref="category/apex/security.xml/ApexOpenRedirect" deprecated="true" />
<rule ref="category/apex/security.xml/ApexSharingViolations" deprecated="true" />
<rule ref="category/apex/security.xml/ApexSOQLInjection" deprecated="true" />
<rule ref="category/apex/security.xml/ApexSuggestUsingNamedCred" deprecated="true" />
<rule ref="category/apex/security.xml/ApexXSSFromEscapeFalse" deprecated="true" />
<rule ref="category/apex/security.xml/ApexXSSFromURLParam" deprecated="true" />
</ruleset>

View File

@ -1,21 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Style"
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 Style Ruleset contains rules regarding preferred usage of names and identifiers.
</description>
<rule ref="category/apex/codestyle.xml/ClassNamingConventions" deprecated="true" />
<rule ref="category/apex/codestyle.xml/MethodNamingConventions" deprecated="true" />
<rule ref="category/apex/errorprone.xml/AvoidDirectAccessTriggerMap" deprecated="true" />
<rule ref="category/apex/errorprone.xml/AvoidHardcodingId" deprecated="true" />
<rule ref="category/apex/errorprone.xml/MethodWithSameNameAsEnclosingClass" deprecated="true" />
<rule ref="category/apex/bestpractices.xml/AvoidGlobalModifier" deprecated="true" />
<rule ref="category/apex/bestpractices.xml/AvoidLogicInTrigger" deprecated="true" />
</ruleset>

View File

@ -15,15 +15,9 @@ import net.sourceforge.pmd.RuleSetLoader;
import com.github.stefanbirkner.systemlambda.SystemLambda;
class DefaultRulesetTest {
class QuickstartRulesetTest {
private static final String QUICKSTART_RULESET = "rulesets/apex/quickstart.xml";
@Test
void loadDefaultRuleset() {
RuleSet ruleset = rulesetLoader().loadFromResource("rulesets/apex/ruleset.xml");
assertNotNull(ruleset);
}
@Test
void loadQuickstartRuleset() throws Exception {
String log = SystemLambda.tapSystemErr(() -> {

View File

@ -1,17 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Android"
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>
These rules deal with the Android SDK, mostly related to best practices.
To get better results, make sure that the auxclasspath is defined for type resolution to work.
</description>
<!-- Rules, that have been moved into a category -->
<rule ref="category/java/errorprone.xml/CallSuperFirst" deprecated="true" />
<rule ref="category/java/errorprone.xml/CallSuperLast" deprecated="true" />
<rule ref="category/java/errorprone.xml/DoNotHardCodeSDCard" deprecated="true" />
</ruleset>

View File

@ -1,42 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Basic"
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 Basic ruleset contains a collection of good practices which should be followed.
</description>
<!-- Rules, that have been moved into a category -->
<rule ref="category/java/errorprone.xml/AvoidBranchingStatementAsLastInLoop" deprecated="true" />
<rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor" deprecated="true" />
<rule ref="category/java/errorprone.xml/AvoidMultipleUnaryOperators" deprecated="true" />
<rule ref="category/java/errorprone.xml/AvoidUsingOctalValues" deprecated="true" />
<rule ref="category/java/errorprone.xml/BrokenNullCheck" deprecated="true" />
<rule ref="category/java/errorprone.xml/CheckSkipResult" deprecated="true" />
<rule ref="category/java/errorprone.xml/ClassCastExceptionWithToArray" deprecated="true" />
<rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices" deprecated="true" />
<rule ref="category/java/errorprone.xml/JumbledIncrementer" deprecated="true" />
<rule ref="category/java/errorprone.xml/MisplacedNullCheck" deprecated="true" />
<rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashcode" deprecated="true" />
<rule ref="category/java/errorprone.xml/ReturnFromFinallyBlock" deprecated="true" />
<rule ref="category/java/errorprone.xml/UnconditionalIfStatement" deprecated="true" />
<rule ref="category/java/multithreading.xml/AvoidThreadGroup" deprecated="true" />
<rule ref="category/java/multithreading.xml/DontCallThreadRun" deprecated="true" />
<rule ref="category/java/multithreading.xml/DoubleCheckedLocking" deprecated="true" />
<rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP" deprecated="true" />
<rule ref="category/java/bestpractices.xml/CheckResultSet" deprecated="true" />
<rule ref="category/java/codestyle.xml/ExtendsObject" deprecated="true" />
<rule ref="category/java/codestyle.xml/ForLoopShouldBeWhileLoop" deprecated="true" />
<rule ref="category/java/performance.xml/BigIntegerInstantiation" deprecated="true" />
<!-- <rule ref="category/java/performance.xml/BooleanInstantiation" deprecated="true" />-->
<rule ref="category/java/design.xml/CollapsibleIfStatements" deprecated="true" />
<rule ref="category/java/design.xml/SimplifiedTernary" deprecated="true" />
</ruleset>

View File

@ -1,18 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Clone Implementation"
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 Clone Implementation ruleset contains a collection of rules that find questionable usages of the clone() method.
</description>
<!-- Rules, that have been moved into a category -->
<rule ref="category/java/errorprone.xml/CloneMethodMustBePublic" deprecated="true" />
<rule ref="category/java/errorprone.xml/CloneMethodMustImplementCloneable" deprecated="true" />
<rule ref="category/java/errorprone.xml/CloneMethodReturnTypeMustMatchClassName" deprecated="true" />
<!-- <rule ref="category/java/errorprone.xml/CloneThrowsCloneNotSupportedException" deprecated="true" />-->
<rule ref="category/java/errorprone.xml/ProperCloneImplementation" deprecated="true" />
</ruleset>

View File

@ -1,23 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Code Size"
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 Code Size ruleset contains rules that find problems related to code size or complexity.
</description>
<!-- Rules, that have been moved into a category -->
<rule ref="category/java/design.xml/CyclomaticComplexity" deprecated="true" />
<rule ref="category/java/design.xml/ExcessiveClassLength" deprecated="true" />
<rule ref="category/java/design.xml/ExcessiveMethodLength" deprecated="true" />
<rule ref="category/java/design.xml/ExcessiveParameterList" deprecated="true" />
<rule ref="category/java/design.xml/ExcessivePublicCount" deprecated="true" />
<rule ref="category/java/design.xml/NcssCount" deprecated="true" />
<rule ref="category/java/design.xml/NPathComplexity" deprecated="true" />
<rule ref="category/java/design.xml/TooManyFields" deprecated="true" />
<rule ref="category/java/design.xml/TooManyMethods" deprecated="true" />
</ruleset>

View File

@ -1,19 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Comments"
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>
Rules intended to catch errors related to code comments
</description>
<!-- Rules, that have been moved into a category -->
<rule ref="category/java/codestyle.xml/CommentDefaultAccessModifier" deprecated="true" />
<rule ref="category/java/documentation.xml/CommentContent" deprecated="true" />
<rule ref="category/java/documentation.xml/CommentRequired" deprecated="true" />
<rule ref="category/java/documentation.xml/CommentSize" deprecated="true" />
</ruleset>

View File

@ -1,44 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Controversial"
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 Controversial ruleset contains rules that, for whatever reason, are considered controversial.
They are held here to allow people to include them as they see fit within their custom rulesets.
</description>
<!-- Rules, that have been moved into a category -->
<rule ref="category/java/errorprone.xml/AssignmentInOperand" deprecated="true" />
<rule ref="category/java/errorprone.xml/AvoidAccessibilityAlteration" deprecated="true" />
<rule ref="category/java/errorprone.xml/AvoidLiteralsInIfCondition" deprecated="true" />
<!-- Removed in PMD 7. -->
<!-- <rule ref="category/java/errorprone.xml/DataflowAnomalyAnalysis" deprecated="true" />-->
<rule ref="category/java/errorprone.xml/DoNotCallGarbageCollectionExplicitly" deprecated="true" />
<rule ref="category/java/errorprone.xml/DontImportSun" deprecated="true" />
<rule ref="category/java/errorprone.xml/NullAssignment" deprecated="true" />
<rule ref="category/java/errorprone.xml/SuspiciousOctalEscape" deprecated="true" />
<rule ref="category/java/codestyle.xml/AtLeastOneConstructor" deprecated="true" />
<rule ref="category/java/codestyle.xml/AvoidUsingNativeCode" deprecated="true" />
<rule ref="category/java/codestyle.xml/CallSuperInConstructor" deprecated="true" />
<!-- <rule ref="category/java/codestyle.xml/DefaultPackage" deprecated="true" />-->
<rule ref="category/java/codestyle.xml/OnlyOneReturn" deprecated="true" />
<rule ref="category/java/codestyle.xml/UnnecessaryConstructor" deprecated="true" />
<rule ref="category/java/multithreading.xml/AvoidUsingVolatile" deprecated="true" />
<rule ref="category/java/multithreading.xml/UseConcurrentHashMap" deprecated="true" />
<rule ref="category/java/bestpractices.xml/OneDeclarationPerLine" deprecated="true" />
<!-- <rule ref="category/java/performance.xml/AvoidUsingShortType" deprecated="true" />-->
<rule ref="category/java/design.xml/UseObjectForClearerAPI" deprecated="true" />
<!-- The rule UnnecessaryParentheses has been merged into unnecessary.xml/UselessParentheses,
which now lives in codestyle -->
<rule name="UnnecessaryParentheses" deprecated="true" ref="category/java/codestyle.xml/UselessParentheses" />
</ruleset>

View File

@ -1,20 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Coupling"
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>
Rules which find instances of high or inappropriate coupling between objects and packages.
</description>
<!-- Rules, that have been moved into a category -->
<rule ref="category/java/bestpractices.xml/LooseCoupling" deprecated="true" />
<rule ref="category/java/design.xml/CouplingBetweenObjects" deprecated="true" />
<rule ref="category/java/design.xml/ExcessiveImports" deprecated="true" />
<rule ref="category/java/design.xml/LawOfDemeter" deprecated="true" />
<rule ref="category/java/design.xml/LoosePackageCoupling" deprecated="true" />
</ruleset>

View File

@ -1,75 +0,0 @@
<?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>

View File

@ -1,25 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Empty Code"
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 Empty Code ruleset contains rules that find empty statements of any kind (empty method,
empty block statement, empty try or catch block,...).
</description>
<!-- Rules, that have been moved into a category -->
<rule ref="category/java/errorprone.xml/EmptyCatchBlock" deprecated="true" />
<rule ref="category/java/errorprone.xml/EmptyFinallyBlock" deprecated="true" />
<rule ref="category/java/errorprone.xml/EmptyIfStmt" deprecated="true" />
<rule ref="category/java/errorprone.xml/EmptyInitializer" deprecated="true" />
<rule ref="category/java/errorprone.xml/EmptyStatementBlock" deprecated="true" />
<rule ref="category/java/errorprone.xml/EmptyStatementNotInLoop" deprecated="true" />
<rule ref="category/java/errorprone.xml/EmptyInitializer" name="EmptyStaticInitializer" deprecated="true" />
<rule ref="category/java/errorprone.xml/EmptySwitchStatements" deprecated="true" />
<rule ref="category/java/errorprone.xml/EmptySynchronizedBlock" deprecated="true" />
<rule ref="category/java/errorprone.xml/EmptyTryBlock" deprecated="true" />
<rule ref="category/java/errorprone.xml/EmptyWhileStmt" deprecated="true" />
</ruleset>

View File

@ -1,20 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Finalizer"
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>
These rules deal with different problems that can occur with finalizers.
</description>
<!-- Rules, that have been moved into a category -->
<rule ref="category/java/errorprone.xml/AvoidCallingFinalize" deprecated="true" />
<rule ref="category/java/errorprone.xml/EmptyFinalizer" deprecated="true" />
<rule ref="category/java/errorprone.xml/FinalizeDoesNotCallSuperFinalize" deprecated="true" />
<rule ref="category/java/errorprone.xml/FinalizeOnlyCallsSuperFinalize" deprecated="true" />
<rule ref="category/java/errorprone.xml/FinalizeOverloaded" deprecated="true" />
<rule ref="category/java/errorprone.xml/FinalizeShouldBeProtected" deprecated="true" />
</ruleset>

View File

@ -1,21 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Import Statements"
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>
These rules deal with different problems that can occur with import statements.
</description>
<!-- Rules, that have been moved into a category -->
<!-- <rule ref="category/java/bestpractices.xml/UnusedImports" deprecated="true" />-->
<!-- <rule ref="category/java/errorprone.xml/ImportFromSamePackage" deprecated="true" />-->
<!-- <rule ref="category/java/codestyle.xml/DontImportJavaLang" deprecated="true" />-->
<!-- <rule ref="category/java/codestyle.xml/DuplicateImports" deprecated="true" />-->
<rule ref="category/java/codestyle.xml/TooManyStaticImports" deprecated="true" />
<rule ref="category/java/codestyle.xml/UnnecessaryFullyQualifiedName" deprecated="true" />
</ruleset>

View File

@ -1,25 +0,0 @@
<?xml version="1.0"?>
<ruleset name="J2EE"
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>
Rules specific to the use of J2EE implementations.
</description>
<!-- Rules, that have been moved into a category -->
<rule ref="category/java/errorprone.xml/DoNotTerminateVM" deprecated="true" />
<rule ref="category/java/errorprone.xml/StaticEJBFieldShouldBeFinal" deprecated="true" />
<rule ref="category/java/errorprone.xml/UseProperClassLoader" deprecated="true" />
<rule ref="category/java/codestyle.xml/LocalHomeNamingConvention" deprecated="true" />
<rule ref="category/java/codestyle.xml/LocalInterfaceSessionNamingConvention" deprecated="true" />
<rule ref="category/java/codestyle.xml/MDBAndSessionBeanNamingConvention" deprecated="true" />
<rule ref="category/java/codestyle.xml/RemoteInterfaceNamingConvention" deprecated="true" />
<rule ref="category/java/codestyle.xml/RemoteSessionInterfaceNamingConvention" deprecated="true" />
<rule ref="category/java/multithreading.xml/DoNotUseThreads" deprecated="true" />
</ruleset>

View File

@ -1,16 +0,0 @@
<?xml version="1.0"?>
<ruleset name="JavaBeans"
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 JavaBeans Ruleset catches instances of bean rules not being followed.
</description>
<!-- Rules, that have been moved into a category -->
<rule ref="category/java/errorprone.xml/BeanMembersShouldSerialize" deprecated="true" />
<rule ref="category/java/errorprone.xml/MissingSerialVersionUID" deprecated="true" />
</ruleset>

View File

@ -1,26 +0,0 @@
<?xml version="1.0"?>
<ruleset name="JUnit"
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>
These rules deal with different problems that can occur with JUnit tests.
</description>
<!-- Rules, that have been moved into a category -->
<rule ref="category/java/errorprone.xml/JUnitSpelling" deprecated="true" />
<rule ref="category/java/errorprone.xml/JUnitStaticSuite" deprecated="true" />
<rule ref="category/java/errorprone.xml/TestClassWithoutTestCases" deprecated="true" />
<rule ref="category/java/errorprone.xml/UnnecessaryBooleanAssertion" deprecated="true" />
<rule ref="category/java/bestpractices.xml/JUnitAssertionsShouldIncludeMessage" deprecated="true" />
<rule ref="category/java/bestpractices.xml/JUnitTestContainsTooManyAsserts" deprecated="true" />
<rule ref="category/java/bestpractices.xml/JUnitTestsShouldIncludeAssert" deprecated="true" />
<!-- <rule ref="category/java/bestpractices.xml/UseAssertEqualsInsteadOfAssertTrue" deprecated="true" />-->
<!-- <rule ref="category/java/bestpractices.xml/UseAssertNullInsteadOfAssertTrue" deprecated="true" />-->
<!-- <rule ref="category/java/bestpractices.xml/UseAssertSameInsteadOfAssertTrue" deprecated="true" />-->
<!-- <rule ref="category/java/bestpractices.xml/UseAssertTrueInsteadOfAssertEquals" deprecated="true" />-->
<!-- <rule ref="category/java/design.xml/SimplifyBooleanAssertion" deprecated="true" />-->
</ruleset>

View File

@ -1,19 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Jakarta Commons Logging"
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 Jakarta Commons Logging ruleset contains a collection of rules that find questionable usages of that framework.
</description>
<!-- Rules, that have been moved into a category -->
<rule ref="category/java/errorprone.xml/ProperLogger" deprecated="true" />
<rule ref="category/java/errorprone.xml/UseCorrectExceptionLogging" deprecated="true" />
<!-- GuardDebugLogging has been merged into GuardLogStatement -->
<rule ref="category/java/bestpractices.xml/GuardLogStatement" name="GuardDebugLogging" deprecated="true" />
<rule ref="category/java/bestpractices.xml/GuardLogStatement" deprecated="true" />
</ruleset>

View File

@ -1,21 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Java Logging"
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 Java Logging ruleset contains a collection of rules that find questionable usages of the logger.
</description>
<!-- Rules, that have been moved into a category -->
<!-- <rule ref="category/java/errorprone.xml/InvalidSlf4jMessageFormat" deprecated="true" />-->
<rule ref="category/java/errorprone.xml/MoreThanOneLogger" deprecated="true" />
<rule ref="category/java/bestpractices.xml/AvoidPrintStackTrace" deprecated="true" />
<!-- GuardLogStatementJavaUtil has been merged into GuardLogStatement -->
<rule ref="category/java/bestpractices.xml/GuardLogStatement" name="GuardLogStatementJavaUtil" deprecated="true" />
<rule ref="category/java/bestpractices.xml/SystemPrintln" deprecated="true" />
</ruleset>

View File

@ -1,15 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Metrics"
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 Metrics ruleset contains rules that flag large / complex code. These rules are alternative implementations to
those already existing in the Design ruleset kept apart until the Metrics framework matures.
</description>
<!-- Rules, that have been moved into a category -->
<rule ref="category/java/design.xml/CyclomaticComplexity" deprecated="true" />
</ruleset>

View File

@ -1,32 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Migration"
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>
Contains rules about migrating from one JDK version to another. Don't use these rules directly,
rather, use a wrapper ruleset such as migrating_to_13.xml.
</description>
<!-- Rules, that have been moved into a category -->
<rule ref="category/java/errorprone.xml/AvoidAssertAsIdentifier" deprecated="true" />
<rule ref="category/java/errorprone.xml/AvoidEnumAsIdentifier" deprecated="true" />
<rule ref="category/java/bestpractices.xml/ForLoopCanBeForeach" deprecated="true" />
<rule ref="category/java/bestpractices.xml/JUnit4SuitesShouldUseSuiteAnnotation" deprecated="true" />
<rule ref="category/java/bestpractices.xml/JUnit4TestShouldUseAfterAnnotation" deprecated="true" />
<rule ref="category/java/bestpractices.xml/JUnit4TestShouldUseBeforeAnnotation" deprecated="true" />
<rule ref="category/java/bestpractices.xml/JUnit4TestShouldUseTestAnnotation" deprecated="true" />
<rule ref="category/java/bestpractices.xml/JUnitUseExpected" deprecated="true" />
<rule ref="category/java/bestpractices.xml/ReplaceEnumerationWithIterator" deprecated="true" />
<rule ref="category/java/bestpractices.xml/ReplaceHashtableWithMap" deprecated="true" />
<rule ref="category/java/bestpractices.xml/ReplaceVectorWithList" deprecated="true" />
<!-- <rule ref="category/java/performance.xml/ByteInstantiation" deprecated="true" />-->
<!-- <rule ref="category/java/performance.xml/IntegerInstantiation" deprecated="true" />-->
<!-- <rule ref="category/java/performance.xml/LongInstantiation" deprecated="true" />-->
<!-- <rule ref="category/java/performance.xml/ShortInstantiation" deprecated="true" />-->
</ruleset>

View File

@ -1,16 +0,0 @@
<?xml version="1.0"?>
<ruleset name="Migration13"
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>
Contains rules for migrating to JDK 1.3
</description>
<rule ref="category/java/bestpractices.xml/ReplaceEnumerationWithIterator" deprecated="true" />
<rule ref="category/java/bestpractices.xml/ReplaceHashtableWithMap" deprecated="true" />
<rule ref="category/java/bestpractices.xml/ReplaceVectorWithList" deprecated="true" />
</ruleset>

Some files were not shown because too many files have changed in this diff Show More