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 2020/02/18 00:16:13 UTC

[commons-geometry] branch master updated (2ad038d -> ead4022)

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

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


    from 2ad038d  Merge pull request #60 from darkma773r/geometry-75
     new 7494486  Update checkstyle
     new e8652c9  Update pmd
     new 67ade11  Update PMD rules to be more lenient.
     new b1c9406  Disable PMD failOnViolation.
     new ecd8839  Remove redundant report goals from after success
     new b1a4c41  Add profile for the examples module.
     new 4ff25b4  Ensure Comparators also implement Serializable.
     new ead4022  Add spot bugs exclusions.

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .travis.yml                                        |  6 ++++-
 .../precision/EpsilonDoublePrecisionContext.java   |  6 ++++-
 pom.xml                                            | 26 ++++++++++++++++++----
 src/main/resources/checkstyle/checkstyle.xml       | 19 +++++++---------
 src/main/resources/pmd/pmd-ruleset.xml             |  7 +++++-
 .../resources/spotbugs/spotbugs-exclude-filter.xml |  6 +++++
 6 files changed, 52 insertions(+), 18 deletions(-)


[commons-geometry] 04/08: Disable PMD failOnViolation.

Posted by ah...@apache.org.
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 b1c94068b2f849e4fbf4ba83f263af8f814f41c0
Author: Alex Herbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 23:50:26 2020 +0000

    Disable PMD failOnViolation.
    
    After upgrading PMD a lot of errors have now been found.
---
 pom.xml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/pom.xml b/pom.xml
index 29d1da4..f7397ff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -284,12 +284,18 @@
           </dependency>
         </dependencies>
         <configuration>
+          <printFailingErrors>true</printFailingErrors>
+          <!-- TODO: remove this when PMD has been fixed. -->
+          <failOnViolation>false</failOnViolation>
           <targetJdk>${maven.compiler.target}</targetJdk>
           <skipEmptyReport>false</skipEmptyReport>
           <analysisCache>true</analysisCache>
           <rulesets>
             <ruleset>${geometry.parent.dir}/src/main/resources/pmd/pmd-ruleset.xml</ruleset>
           </rulesets>
+          <excludeRoots>
+            <excludeRoot>target/generated-sources</excludeRoot>
+          </excludeRoots>
         </configuration>
       </plugin>
       <plugin>
@@ -422,6 +428,8 @@
         <artifactId>maven-pmd-plugin</artifactId>
         <version>${geometry.pmd.version}</version>
         <configuration>
+          <verbose>false</verbose>
+          <printFailingErrors>true</printFailingErrors>
           <targetJdk>${maven.compiler.target}</targetJdk>
           <skipEmptyReport>false</skipEmptyReport>
           <analysisCache>true</analysisCache>


[commons-geometry] 01/08: Update checkstyle

Posted by ah...@apache.org.
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 749448646aadae76b85a41147fb69e1811a144b1
Author: Alex Herbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 23:15:31 2020 +0000

    Update checkstyle
    
    maven plugin 3.0.0 -> 3.1.0
    Dependency 8.20 -> 8.29
---
 pom.xml                                      |  4 ++--
 src/main/resources/checkstyle/checkstyle.xml | 19 ++++++++-----------
 2 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/pom.xml b/pom.xml
index 6823431..a7417da 100644
--- a/pom.xml
+++ b/pom.xml
@@ -55,8 +55,8 @@
     <maven.compiler.target>1.8</maven.compiler.target>
     <geometry.pmd.version>3.9.0</geometry.pmd.version>
     <geometry.pmd.dep.version>6.14.0</geometry.pmd.dep.version>
-    <geometry.checkstyle.version>3.0.0</geometry.checkstyle.version>
-    <geometry.checkstyle.dep.version>8.20</geometry.checkstyle.dep.version>
+    <geometry.checkstyle.version>3.1.0</geometry.checkstyle.version>
+    <geometry.checkstyle.dep.version>8.29</geometry.checkstyle.dep.version>
     <geometry.mathjax.version>2.7.2</geometry.mathjax.version>
     <!-- Workaround to avoid duplicating config files. -->
     <geometry.parent.dir>${basedir}</geometry.parent.dir>
diff --git a/src/main/resources/checkstyle/checkstyle.xml b/src/main/resources/checkstyle/checkstyle.xml
index d834902..df2fde3 100644
--- a/src/main/resources/checkstyle/checkstyle.xml
+++ b/src/main/resources/checkstyle/checkstyle.xml
@@ -57,6 +57,12 @@
   <!-- Checks for Size Violations. -->
   <!-- See http://checkstyle.sourceforge.net/config_sizes.html -->
   <module name="FileLength" />
+  <module name="LineLength">
+    <property name="fileExtensions" value="java"/>
+    <!-- Ignore lines that begin with " * ", such as within a Javadoc comment. -->
+    <property name="ignorePattern" value="^ *\* *[^ ]"/>
+    <property name="max" value="120"/>
+  </module>
 
   <!-- Checks for whitespace -->
   <!-- See http://checkstyle.sourceforge.net/config_whitespace.html -->
@@ -81,12 +87,8 @@
 
     <!-- Checks for Javadoc comments. -->
     <!-- See http://checkstyle.sourceforge.net/config_javadoc.html -->
-    <!-- Require method javadocs, allow undeclared RTE -->
-    <module name="JavadocMethod">
-      <property name="allowUndeclaredRTE" value="true"/>
-      <property name="allowThrowsTagsForSubclasses" value="true"/>
-      <property name="validateThrows" value="false"/>
-    </module>
+    <module name="InvalidJavadocPosition"/>
+    <module name="JavadocMethod" />
     <module name="JavadocType" />
     <module name="JavadocVariable" />
     <module name="JavadocStyle" />
@@ -115,11 +117,6 @@
 
     <!-- Checks for Size Violations. -->
     <!-- See http://checkstyle.sourceforge.net/config_sizes.html -->
-    <module name="LineLength">
-      <!-- Ignore lines that begin with " * ", such as within a Javadoc comment. -->
-      <property name="ignorePattern" value="^ *\* *[^ ]"/>
-      <property name="max" value="120"/>
-    </module>
     <module name="MethodLength" />
     <module name="ParameterNumber" />
 


[commons-geometry] 07/08: Ensure Comparators also implement Serializable.

Posted by ah...@apache.org.
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 4ff25b4d1f5d20e2167b5cf235e72a14f8701d90
Author: Alex Herbert <a....@sussex.ac.uk>
AuthorDate: Tue Feb 18 00:04:26 2020 +0000

    Ensure Comparators also implement Serializable.
---
 .../geometry/core/precision/EpsilonDoublePrecisionContext.java      | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/precision/EpsilonDoublePrecisionContext.java b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/precision/EpsilonDoublePrecisionContext.java
index 30d2d10..65f5620 100644
--- a/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/precision/EpsilonDoublePrecisionContext.java
+++ b/commons-geometry-core/src/main/java/org/apache/commons/geometry/core/precision/EpsilonDoublePrecisionContext.java
@@ -18,6 +18,8 @@ package org.apache.commons.geometry.core.precision;
 
 import org.apache.commons.numbers.core.Precision;
 
+import java.io.Serializable;
+
 /** Simple {@link DoublePrecisionContext} subclass that uses an absolute epsilon value to
  * determine equality between doubles.
  *
@@ -28,7 +30,9 @@ import org.apache.commons.numbers.core.Precision;
  *
  * @see Precision#compareTo(double, double, double)
  */
-public class EpsilonDoublePrecisionContext extends DoublePrecisionContext {
+public class EpsilonDoublePrecisionContext extends DoublePrecisionContext implements Serializable {
+    private static final long serialVersionUID = 1L;
+
     /** Epsilon value. */
     private final double epsilon;
 


[commons-geometry] 08/08: Add spot bugs exclusions.

Posted by ah...@apache.org.
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 ead4022ad637c0a74e4b5708c5a3f8dc850dc414
Author: Alex Herbert <a....@sussex.ac.uk>
AuthorDate: Tue Feb 18 00:11:20 2020 +0000

    Add spot bugs exclusions.
---
 src/main/resources/spotbugs/spotbugs-exclude-filter.xml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/main/resources/spotbugs/spotbugs-exclude-filter.xml b/src/main/resources/spotbugs/spotbugs-exclude-filter.xml
index 9993593..138dfed 100644
--- a/src/main/resources/spotbugs/spotbugs-exclude-filter.xml
+++ b/src/main/resources/spotbugs/spotbugs-exclude-filter.xml
@@ -28,4 +28,10 @@
 
   <Class name="~.*\.jmh\.generated\..*" />
 
+  <Match>
+    <!-- This is a false positive -->
+    <Class name="org.apache.commons.geometry.core.partitioning.bsp.AbstractBSPTree"/>
+    <BugPattern name="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE"/>
+  </Match>
+
 </FindBugsFilter>


[commons-geometry] 02/08: Update pmd

Posted by ah...@apache.org.
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 e8652c967821e022f42dd79ba9ec1a34a55d1496
Author: Alex Herbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 23:17:50 2020 +0000

    Update pmd
    
    3.9.0 -> 3.13.0
    dependency 6.14.0 -> 6.21.0
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index a7417da..29d1da4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,8 +53,8 @@
     <commons.encoding>UTF-8</commons.encoding>
     <maven.compiler.source>1.8</maven.compiler.source>
     <maven.compiler.target>1.8</maven.compiler.target>
-    <geometry.pmd.version>3.9.0</geometry.pmd.version>
-    <geometry.pmd.dep.version>6.14.0</geometry.pmd.dep.version>
+    <geometry.pmd.version>3.13.0</geometry.pmd.version>
+    <geometry.pmd.dep.version>6.21.0</geometry.pmd.dep.version>
     <geometry.checkstyle.version>3.1.0</geometry.checkstyle.version>
     <geometry.checkstyle.dep.version>8.29</geometry.checkstyle.dep.version>
     <geometry.mathjax.version>2.7.2</geometry.mathjax.version>


[commons-geometry] 03/08: Update PMD rules to be more lenient.

Posted by ah...@apache.org.
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 67ade11087e24bbdc6504b6ae9825ab3246928a6
Author: Alex Herbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 23:47:08 2020 +0000

    Update PMD rules to be more lenient.
---
 src/main/resources/pmd/pmd-ruleset.xml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/main/resources/pmd/pmd-ruleset.xml b/src/main/resources/pmd/pmd-ruleset.xml
index 2caa5cf..92d8907 100644
--- a/src/main/resources/pmd/pmd-ruleset.xml
+++ b/src/main/resources/pmd/pmd-ruleset.xml
@@ -36,6 +36,8 @@
     <exclude name="AbstractNaming" />
     <exclude name="UselessParentheses" />
     <exclude name="AtLeastOneConstructor" />
+    <exclude name="OnlyOneReturn" />
+    <exclude name="UseUnderscoresInNumericLiterals" />
     <exclude name="GenericsNaming" />
   </rule>
   <rule ref="category/java/design.xml">
@@ -48,7 +50,10 @@
     <exclude name="CommentSize" />
   </rule>
   <rule ref="category/java/errorprone.xml">
-    <!-- <exclude name="..." /> -->
+    <exclude name="BeanMembersShouldSerialize" />
+    <!-- This rule is known to be poor with Java 5 and later:
+      https://github.com/pmd/pmd/issues/873 -->
+    <exclude name="DataflowAnomalyAnalysis" />
   </rule>
   <rule ref="category/java/multithreading.xml">
     <!-- <exclude name="..." /> -->


[commons-geometry] 06/08: Add profile for the examples module.

Posted by ah...@apache.org.
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 b1a4c41ace3c83b0c502e82df5051d87a06dc7fe
Author: Alex Herbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 23:56:05 2020 +0000

    Add profile for the examples module.
    
    Ensure rat:check and checkstyle:check are run by travis.
---
 .travis.yml |  4 ++++
 pom.xml     | 10 ++++++++++
 2 files changed, 14 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 1929bfd..9eea521 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,5 +24,9 @@ jdk:
   - openjdk13
   - openjdk-ea
 
+script:
+  - mvn
+  - mvn -P commons-geometry-examples --projects commons-geometry-examples verify apache-rat:check checkstyle:check
+
 after_success:
   - mvn jacoco:report coveralls:report
diff --git a/pom.xml b/pom.xml
index f7397ff..076e2c5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -596,6 +596,16 @@
       </build>
     </profile>
 
+    <!--
+        Profiles for modules with special requirements.
+    -->
+    <profile>
+      <id>commons-geometry-examples</id>
+      <modules>
+        <module>commons-geometry-examples</module>
+      </modules>
+    </profile>
+
   </profiles>
 
   <developers>


[commons-geometry] 05/08: Remove redundant report goals from after success

Posted by ah...@apache.org.
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 ecd8839174b0c7eb726edd615452359287068dcf
Author: Alex Herbert <a....@sussex.ac.uk>
AuthorDate: Mon Feb 17 23:53:13 2020 +0000

    Remove redundant report goals from after success
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index f6bfbce..1929bfd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,4 +25,4 @@ jdk:
   - openjdk-ea
 
 after_success:
-  - mvn clean test pmd:pmd spotbugs:spotbugs checkstyle:checkstyle jacoco:report coveralls:report
+  - mvn jacoco:report coveralls:report