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 2024/07/08 11:17:03 UTC
(commons-numbers) 01/07: Fix PMD ShortMethodName exclusions
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-numbers.git
commit 5e81b1edf2a19187b4bbd18529c0f128236b8aa9
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Mon Jul 8 11:35:40 2024 +0100
Fix PMD ShortMethodName exclusions
---
src/conf/pmd/pmd-ruleset.xml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/conf/pmd/pmd-ruleset.xml b/src/conf/pmd/pmd-ruleset.xml
index 3e829c70..a72b73d2 100644
--- a/src/conf/pmd/pmd-ruleset.xml
+++ b/src/conf/pmd/pmd-ruleset.xml
@@ -74,8 +74,10 @@
<rule ref="category/java/codestyle.xml/ShortMethodName">
<properties>
- <!-- TODO: Current regex effectively disables this rule. -->
- <property name="violationSuppressXPath" value="./ancestor-or-self::ClassDeclaration[matches(@SimpleName, '^.*$')]"/>
+ <property name="violationSuppressXPath" value="./ancestor-or-self::MethodDeclaration[@Name='of'
+ or @Name='hi' or @Name='lo'] |
+ ./ancestor-or-self::ClassDeclaration[@SimpleName='DoubleEquivalence'
+ or @SimpleName='LanczosApproximation']"/>
</properties>
</rule>
<rule ref="category/java/codestyle.xml/ClassNamingConventions">