commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aherb...@apache.org
Subject [commons-geometry] 03/03: Update PMD rules
Date Tue, 18 Feb 2020 07:18:58 GMT
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-geometry.git

commit 0d064e42e6bbe05c074ff2de691fb81cbed8a048
Author: Alex Herbert <a.herbert@sussex.ac.uk>
AuthorDate: Tue Feb 18 07:18:51 2020 +0000

    Update PMD rules
    
    Allow 'NaN' as constant name.
    Relax utility class pattern.
    Allow short method names.
---
 src/main/resources/pmd/pmd-ruleset.xml | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/src/main/resources/pmd/pmd-ruleset.xml b/src/main/resources/pmd/pmd-ruleset.xml
index 0307f27..24c4280 100644
--- a/src/main/resources/pmd/pmd-ruleset.xml
+++ b/src/main/resources/pmd/pmd-ruleset.xml
@@ -25,6 +25,7 @@
 
   <rule ref="category/java/bestpractices.xml">
     <exclude name="UseVarargs" />
+    <exclude name="ReplaceVectorWithList" />
   </rule>
   <rule ref="category/java/codestyle.xml">
     <exclude name="MethodArgumentCouldBeFinal" />
@@ -68,4 +69,23 @@
     </properties>
   </rule>
 
+  <rule ref="category/java/codestyle.xml/FieldNamingConventions">
+    <properties>
+      <property name="publicConstantPattern" value="([A-Z][A-Z_0-9]*)|NaN" />
+    </properties>
+  </rule>
+
+  <rule ref="category/java/codestyle.xml/ClassNamingConventions">
+    <properties>
+      <property name="utilityClassPattern" value="[A-Z][a-zA-Z0-9]+" />
+    </properties>
+  </rule>
+
+  <rule ref="category/java/codestyle.xml/ShortMethodName">
+    <properties>
+        <!-- Allow short method names such as 'eq' and 'of' -->
+      <property name="minimum" value="2" />
+    </properties>
+  </rule>
+
 </ruleset>


Mime
View raw message