Skip to content

Commit

Permalink
TASK-4170 updated pmd-ruleset.xml to PMD 7.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolf2323 committed May 8, 2024
1 parent a1ef385 commit 2163bd3
Showing 1 changed file with 31 additions and 22 deletions.
53 changes: 31 additions & 22 deletions configs/pmd-ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<rule ref="category/java/bestpractices.xml/SimplifiableTestAssertion"/>
<rule ref="category/java/bestpractices.xml/SwitchStmtsShouldHaveDefault"/>
<rule ref="category/java/bestpractices.xml/SystemPrintln"/>
<rule ref="category/java/bestpractices.xml/UnnecessaryVarargsArrayCreation" />
<rule ref="category/java/bestpractices.xml/UnusedAssignment"/>
<rule ref="category/java/bestpractices.xml/UnusedFormalParameter"/>
<rule ref="category/java/bestpractices.xml/UnusedLocalVariable"/>
Expand All @@ -66,7 +67,7 @@

<rule ref="category/java/codestyle.xml/AtLeastOneConstructor">
<properties>
<property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[matches(@Image, '^.*(IT|Tests|Fixture)$')]"/>
<property name="violationSuppressXPath" value="//ClassDeclaration[matches(@Image, '^.*(IT|Tests|Fixture)$')]"/>
</properties>
</rule>
<rule ref="category/java/codestyle.xml/AvoidDollarSigns"/>
Expand All @@ -83,20 +84,20 @@
</rule>
<rule ref="category/java/codestyle.xml/CommentDefaultAccessModifier">
<properties>
<property name="ignoredAnnotations" value="com.google.common.annotations.VisibleForTesting
| android.support.annotation.VisibleForTesting
| org.junit.jupiter.api.Test
| org.junit.jupiter.api.ParameterizedTest
| org.junit.jupiter.api.RepeatedTest
| org.junit.jupiter.api.TestFactory
| org.junit.jupiter.api.TestTemplate
| org.junit.jupiter.api.BeforeEach
| org.junit.jupiter.api.BeforeAll
| org.junit.jupiter.api.AfterEach
| org.junit.jupiter.api.AfterAll
| org.junit.jupiter.api.Nested
| org.junit.jupiter.params.ParameterizedTest
| org.jetbrains.annotations.VisibleForTesting
<property name="ignoredAnnotations" value="com.google.common.annotations.VisibleForTesting,
android.support.annotation.VisibleForTesting,
org.junit.jupiter.api.Test,
org.junit.jupiter.api.ParameterizedTest,
org.junit.jupiter.api.RepeatedTest,
org.junit.jupiter.api.TestFactory,
org.junit.jupiter.api.TestTemplate,
org.junit.jupiter.api.BeforeEach,
org.junit.jupiter.api.BeforeAll,
org.junit.jupiter.api.AfterEach,
org.junit.jupiter.api.AfterAll,
org.junit.jupiter.api.Nested,
org.junit.jupiter.params.ParameterizedTest,
org.jetbrains.annotations.VisibleForTesting
"/>
</properties>
</rule>
Expand All @@ -116,9 +117,10 @@
<rule ref="category/java/codestyle.xml/FormalParameterNamingConventions"/>
<rule ref="category/java/codestyle.xml/GenericsNaming"/>
<rule ref="category/java/codestyle.xml/IdenticalCatchBranches"/>
<rule ref="category/java/codestyle.xml/LambdaCanBeMethodReference" />
<rule ref="category/java/codestyle.xml/LinguisticNaming">
<properties>
<property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[matches(@Image, '^.*(IT|Tests)$')]"/>
<property name="violationSuppressXPath" value="//ClassDeclaration[matches(@Image, '^.*(IT|Tests)$')]"/>
</properties>
</rule>
<rule ref="category/java/codestyle.xml/LocalHomeNamingConvention"/>
Expand All @@ -141,17 +143,18 @@
<rule ref="category/java/codestyle.xml/RemoteSessionInterfaceNamingConvention"/>
<rule ref="category/java/codestyle.xml/ShortClassName">
<properties>
<property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[matches(@Image, '^.*(IT|Tests)$')]"/>
<property name="violationSuppressXPath" value="//ClassDeclaration[matches(@Image, '^.*(IT|Tests)$')]"/>
</properties>
</rule>
<rule ref="category/java/codestyle.xml/ShortMethodName"/>
<rule ref="category/java/codestyle.xml/ShortVariable"/>
<rule ref="category/java/codestyle.xml/TooManyStaticImports">
<properties>
<property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[matches(@Image, '^.*(IT|Tests|Fixture)$')]"/>
<property name="violationSuppressXPath" value="//ClassDeclaration[matches(@Image, '^.*(IT|Tests|Fixture)$')]"/>
</properties>
</rule>
<rule ref="category/java/codestyle.xml/UnnecessaryAnnotationValueElement"/>
<rule ref="category/java/codestyle.xml/UnnecessaryBoxing" />
<rule ref="category/java/codestyle.xml/UnnecessaryCast"/>
<!--<rule ref="category/java/codestyle.xml/UnnecessaryConstructor"/>-->
<rule ref="category/java/codestyle.xml/UnnecessaryFullyQualifiedName"/>
Expand All @@ -161,6 +164,7 @@
<rule ref="category/java/codestyle.xml/UnnecessaryReturn"/>
<rule ref="category/java/codestyle.xml/UnnecessarySemicolon"/>
<rule ref="category/java/codestyle.xml/UseDiamondOperator"/>
<rule ref="category/java/codestyle.xml/UseExplicitTypes" />
<rule ref="category/java/codestyle.xml/UselessParentheses"/>
<rule ref="category/java/codestyle.xml/UselessQualifiedThis"/>
<rule ref="category/java/codestyle.xml/UseShortArrayInitializer"/>
Expand Down Expand Up @@ -189,7 +193,11 @@
<rule ref="category/java/design.xml/GodClass"/>
<rule ref="category/java/design.xml/ImmutableField"/>
<rule ref="category/java/design.xml/InvalidJavaBean"/>
<!--<rule ref="category/java/design.xml/LawOfDemeter"/>-->
<rule ref="category/java/design.xml/LawOfDemeter">
<properties>
<property name="trustRadius" value="3"/>
</properties>
</rule>
<rule ref="category/java/design.xml/LogicInversion"/>
<!--<rule ref="category/java/design.xml/LoosePackageCoupling"/>-->
<rule ref="category/java/design.xml/MutableStaticState"/>
Expand All @@ -205,7 +213,7 @@
<rule ref="category/java/design.xml/TooManyFields"/>
<rule ref="category/java/design.xml/TooManyMethods">
<properties>
<property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[matches(@Image, '^.*(IT|Tests)$')]"/>
<property name="violationSuppressXPath" value="//ClassDeclaration[matches(@Image, '^.*(IT|Tests)$')]"/>
</properties>
</rule>
<rule ref="category/java/design.xml/UselessOverridingMethod"/>
Expand All @@ -215,7 +223,7 @@
<rule ref="category/java/documentation.xml/CommentContent"/>
<rule ref="category/java/documentation.xml/CommentRequired">
<properties>
<property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[matches(@Image, '^.*(IT|Tests|Fixture)$')]"/>
<property name="violationSuppressXPath" value="//ClassDeclaration[matches(@Image, '^.*(IT|Tests|Fixture)$')]"/>
</properties>
</rule>
<rule ref="category/java/documentation.xml/CommentSize">
Expand All @@ -239,7 +247,7 @@
<rule ref="category/java/errorprone.xml/AvoidDuplicateLiterals">
<properties>
<property name="skipAnnotations" value="true" />
<property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[matches(@Image, '^.*(IT|Tests)$')]"/>
<property name="violationSuppressXPath" value="//ClassDeclaration[matches(@Image, '^.*(IT|Tests)$')]"/>
</properties>
</rule>
<rule ref="category/java/errorprone.xml/AvoidEnumAsIdentifier"/>
Expand All @@ -261,6 +269,7 @@
<rule ref="category/java/errorprone.xml/CloneMethodReturnTypeMustMatchClassName"/>
<rule ref="category/java/errorprone.xml/CloseResource"/>
<rule ref="category/java/errorprone.xml/CompareObjectsWithEquals"/>
<rule ref="category/java/errorprone.xml/ConfusingArgumentToVarargsMethod" />
<rule ref="category/java/errorprone.xml/ConstructorCallsOverridableMethod"/>
<rule ref="category/java/errorprone.xml/DetachedTestCase"/>
<rule ref="category/java/errorprone.xml/DoNotCallGarbageCollectionExplicitly"/>
Expand Down

0 comments on commit 2163bd3

Please sign in to comment.