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 2021/07/14 14:24:05 UTC

[commons-rng] 11/23: PMD: Suppress select errors for sampling examples module

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 c2c95f008d07f3b3c4c600c632fbf5c03a85ec27
Author: aherbert <ah...@apache.org>
AuthorDate: Wed Jul 14 14:24:53 2021 +0100

    PMD: Suppress select errors for sampling examples module
---
 src/main/resources/pmd/pmd-ruleset.xml | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/pmd/pmd-ruleset.xml b/src/main/resources/pmd/pmd-ruleset.xml
index 2dfaae7..3c53626 100644
--- a/src/main/resources/pmd/pmd-ruleset.xml
+++ b/src/main/resources/pmd/pmd-ruleset.xml
@@ -103,12 +103,19 @@
       <property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[matches(@SimpleName, '^.*Sampler$')]"/>
     </properties>
   </rule>
+  <rule ref="category/java/codestyle.xml/FieldNamingConventions">
+    <properties>
+      <property name="violationSuppressXPath"
+        value="//ClassOrInterfaceDeclaration[@SimpleName='ProbabilityDensityApproximationCommand']"/>
+    </properties>
+  </rule>
 
   <rule ref="category/java/design.xml/NPathComplexity">
     <properties>
       <!-- Increase from default of 200 -->
       <property name="violationSuppressXPath"
-        value="//ClassOrInterfaceDeclaration[@SimpleName='LargeMeanPoissonSampler' or @SimpleName='MersenneTwister']"/>
+        value="//ClassOrInterfaceDeclaration[@SimpleName='LargeMeanPoissonSampler' or @SimpleName='MersenneTwister'
+          or @SimpleName='ProbabilityDensityApproximationCommand']"/>
     </properties>
   </rule>
   <rule ref="category/java/design.xml/CyclomaticComplexity">
@@ -130,7 +137,8 @@
   <rule ref="category/java/design.xml/ExcessiveMethodLength">
     <properties>
       <!-- The length is due to comments -->
-      <property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[@SimpleName='AliasMethodDiscreteSampler']"/>
+      <property name="violationSuppressXPath" value="//ClassOrInterfaceDeclaration[@SimpleName='AliasMethodDiscreteSampler'
+        or @SimpleName='ProbabilityDensityApproximationCommand']"/>
     </properties>
   </rule>
   <rule ref="category/java/design.xml/ExcessiveClassLength">