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/25 12:48:30 UTC

[commons-statistics] branch master updated: 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-statistics.git


The following commit(s) were added to refs/heads/master by this push:
     new 2cedbe1  Update PMD rules
2cedbe1 is described below

commit 2cedbe1cc09457c9c2dbb3c07fbf7fb92b509247
Author: aherbert <ah...@apache.org>
AuthorDate: Tue Apr 25 13:48:10 2023 +0100

    Update PMD rules
    
    Remove deprecated ExcessiveClassLength and ExcessiveMethodLength. Enable
    NcssCount as a replacement. This can use similar PMD suppressions to
    ignore previously allowed violations of the deprecated rules.
---
 src/conf/pmd/pmd-ruleset.xml | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

diff --git a/src/conf/pmd/pmd-ruleset.xml b/src/conf/pmd/pmd-ruleset.xml
index 63c7606..7d1db2f 100644
--- a/src/conf/pmd/pmd-ruleset.xml
+++ b/src/conf/pmd/pmd-ruleset.xml
@@ -51,7 +51,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">
@@ -132,12 +131,12 @@
         value="./ancestor-or-self::ClassOrInterfaceDeclaration[@SimpleName='AbstractContinuousDistribution']"/>
     </properties>
   </rule>
-  <rule ref="category/java/design.xml/ExcessiveMethodLength">
+  <rule ref="category/java/design.xml/NcssCount">
     <properties>
       <!-- Method length is due to comments. -->
       <property name="violationSuppressXPath"
-        value="./ancestor-or-self::ClassOrInterfaceDeclaration[@SimpleName='AbstractContinuousDistribution'
-          or @SimpleName='KolmogorovSmirnovTest' or @SimpleName='KolmogorovSmirnovDistribution' or @SimpleName='DD'
+        value="./ancestor-or-self::ClassOrInterfaceDeclaration[@SimpleName='KolmogorovSmirnovTest'
+          or @SimpleName='KolmogorovSmirnovDistribution' or @SimpleName='DD'
           or @SimpleName='BracketFinder' or @SimpleName='BrentOptimizer']"/>
     </properties>
   </rule>
@@ -169,14 +168,6 @@
         value="./ancestor-or-self::ClassOrInterfaceDeclaration[@SimpleName='Arguments']"/>
     </properties>
   </rule>
-  <rule ref="category/java/design.xml/ExcessiveClassLength">
-    <properties>
-      <property name="violationSuppressXPath"
-        value="./ancestor-or-self::ClassOrInterfaceDeclaration[@SimpleName='KolmogorovSmirnovTest'
-          or @SimpleName='KolmogorovSmirnovDistribution' or @SimpleName='DD'
-          or @SimpleName='UnconditionedExactTest']"/>
-    </properties>
-  </rule>
   <rule ref="category/java/design.xml/UselessOverridingMethod">
     <properties>
       <!-- overridden in the inference module for documentation -->