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 11f8ef9  Update checkstyle
11f8ef9 is described below

commit 11f8ef98902d5f872dbb837d6d6654425e4edfa5
Author: Alex Herbert <aherb...@apache.org>
AuthorDate: Sat Jun 25 10:44:39 2022 +0100

    Update checkstyle
    
    plugin 3.0.0 -> 3.1.2
    dependency 8.20 -> 8.45
    
    Add missing javadoc checks
    
    Correct use of line length check.
    
    Allow long line length for test properties files.
    
    Correct unnecessary parentheses.
---
 .../distribution/GammaDistributionTest.java         |  2 +-
 pom.xml                                             |  4 ++--
 .../checkstyle/checkstyle-suppressions.xml          |  2 ++
 src/main/resources/checkstyle/checkstyle.xml        | 21 ++++++++++-----------
 4 files changed, 15 insertions(+), 14 deletions(-)

diff --git 
a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/GammaDistributionTest.java
 
b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/GammaDistributionTest.java
index 2bd0d99..6b56fec 100644
--- 
a/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/GammaDistributionTest.java
+++ 
b/commons-statistics-distribution/src/test/java/org/apache/commons/statistics/distribution/GammaDistributionTest.java
@@ -191,7 +191,7 @@ class GammaDistributionTest extends 
BaseContinuousDistributionTest {
          * double Gamma.logGamma(double)
          * prior to MATH-849
          */
-        if (Double.isNaN(x) || (x <= 0.0)) {
+        if (Double.isNaN(x) || x <= 0.0) {
             return Double.NaN;
         }
         final double sum = LanczosApproximation.value(x);
diff --git a/pom.xml b/pom.xml
index 105fd8c..3e231d3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -95,8 +95,8 @@
     <statistics.pmd.version>3.12.0</statistics.pmd.version>
     <statistics.pmd.dep.version>6.14.0</statistics.pmd.dep.version>
     <statistics.spotbugs.version>4.4.2</statistics.spotbugs.version>
-    <statistics.checkstyle.version>3.0.0</statistics.checkstyle.version>
-    <statistics.checkstyle.dep.version>8.20</statistics.checkstyle.dep.version>
+    <statistics.checkstyle.version>3.1.2</statistics.checkstyle.version>
+    <statistics.checkstyle.dep.version>8.45</statistics.checkstyle.dep.version>
     <statistics.clirr.version>2.8</statistics.clirr.version>
     <statistics.junit.bom.version>5.8.0</statistics.junit.bom.version>
     <statistics.antrun.version>1.8</statistics.antrun.version>
diff --git a/src/main/resources/checkstyle/checkstyle-suppressions.xml 
b/src/main/resources/checkstyle/checkstyle-suppressions.xml
index 1769ca2..1c9a144 100644
--- a/src/main/resources/checkstyle/checkstyle-suppressions.xml
+++ b/src/main/resources/checkstyle/checkstyle-suppressions.xml
@@ -27,5 +27,7 @@
   <suppress checks="MultipleStringLiterals" files=".*[/\\]test[/\\].*" />
   <suppress checks="DesignForExtension" files=".*[/\\]test[/\\].*" />
   <suppress checks="LineLength" files=".*[/\\]test[/\\].*" />
+  <suppress checks="UnnecessaryParentheses" files=".*[/\\]test[/\\].*" />
+  <suppress checks="LineLength" files=".*[/\\]test.*.properties" />
   <suppress checks="LocalFinalVariableName" 
files=".*[/\\]HypergeometricDistributionTest.java" />
 </suppressions>
diff --git a/src/main/resources/checkstyle/checkstyle.xml 
b/src/main/resources/checkstyle/checkstyle.xml
index a80195b..fda6f38 100644
--- a/src/main/resources/checkstyle/checkstyle.xml
+++ b/src/main/resources/checkstyle/checkstyle.xml
@@ -57,6 +57,11 @@
   <!-- Checks for Size Violations. -->
   <!-- See http://checkstyle.sourceforge.net/config_sizes.html -->
   <module name="FileLength" />
+  <module name="LineLength">
+    <!-- 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 -->
@@ -83,15 +88,14 @@
     <!-- 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" />
-    <!-- <module name="MissingJavadocType"/> -->
+    <module name="MissingJavadocMethod" />
+    <module name="MissingJavadocPackage" />
+    <module name="MissingJavadocType" />
 
     <!-- Checks for Naming Conventions. -->
     <!-- See http://checkstyle.sourceforge.net/config_naming.html -->
@@ -116,11 +120,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" />
 

Reply via email to