You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2023/04/27 09:35:19 UTC

[commons-rng] 02/02: Update PMD rules

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git

commit 7c365174700d76bb6ec564b707de3bf66a6988a7
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Apr 25 14:30:51 2023 +0100

    Update PMD rules
    
    Remove deprecated ExcessiveClassLength and ExcessiveMethodLength. Enable
    NcssCount as a replacement. This ignores code comments and previous
    violations of the deprecated rules do not violate the NcssCount.
---
 src/main/resources/pmd/pmd-ruleset.xml | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/src/main/resources/pmd/pmd-ruleset.xml b/src/main/resources/pmd/pmd-ruleset.xml
index 482b91e2..112c365d 100644
--- a/src/main/resources/pmd/pmd-ruleset.xml
+++ b/src/main/resources/pmd/pmd-ruleset.xml
@@ -45,7 +45,6 @@
   <rule ref="category/java/design.xml">
     <exclude name="TooManyMethods" />
     <exclude name="LawOfDemeter" />
-    <exclude name="NcssCount" />
     <exclude name="LoosePackageCoupling" />
   </rule>
   <rule ref="category/java/documentation.xml">
@@ -176,22 +175,6 @@
       <property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[@SimpleName='ProviderBuilder']"/>
     </properties>
   </rule>
-  <rule ref="category/java/design.xml/ExcessiveMethodLength">
-    <properties>
-      <!-- The length is due to comments, or for RandomSource the wrapping of a delegate UniformRandomProvider -->
-      <property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[@SimpleName='AliasMethodDiscreteSampler'
-        or @SimpleName='ProbabilityDensityApproximationCommand']
-        or ./ancestor::EnumDeclaration[@SimpleName='RandomSource']"/>
-    </properties>
-  </rule>
-  <rule ref="category/java/design.xml/ExcessiveClassLength">
-    <properties>
-      <!-- The length is due to multiple implementations as inner classes -->
-      <property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[@SimpleName='MarsagliaTsangWangDiscreteSampler'
-        or @SimpleName='CompositeSamplers' or @SimpleName='StableSampler' or @SimpleName='ZigguratSampler']
-        or ./ancestor::EnumDeclaration[@SimpleName='RandomSource']"/>
-    </properties>
-  </rule>
   <rule ref="category/java/design.xml/ExcessiveParameterList">
     <properties>
       <!-- The length is due to the size of the internal state saved in the state object -->