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 2019/08/01 07:09:52 UTC

[commons-rng] branch master updated: Suppress checkstyle failure for this 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


The following commit(s) were added to refs/heads/master by this push:
     new 57e8401  Suppress checkstyle failure for this module.
57e8401 is described below

commit 57e8401d3db5fb4b8a236c5c34fffb5be9429b19
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Thu Aug 1 08:09:48 2019 +0100

    Suppress checkstyle failure for this module.
    
    Checkstyle requires loading exception classes mentioned in the @throws
    tag to check whether they are RuntimeExceptions. The custom
    ApplicationException cannot be loaded and this causes the default build
    to fail on the checkstyle:check goal unless the failure is ignored.
---
 commons-rng-examples/examples-stress/pom.xml | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/commons-rng-examples/examples-stress/pom.xml b/commons-rng-examples/examples-stress/pom.xml
index 29480e2..3c01926 100644
--- a/commons-rng-examples/examples-stress/pom.xml
+++ b/commons-rng-examples/examples-stress/pom.xml
@@ -66,6 +66,22 @@
     </dependency>
   </dependencies>
 
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <!-- The custom ApplicationException cannot be loaded by checkstyle unless the source is
+            compiled. Checkstyle runs in the validate phase and fails unless the
+            module JavadocMethod has property suppressLoadErrors=true. Workaround setting this
+            globally in the configuration file by suppressing fail locally to this module. 
+            See: https://checkstyle.sourceforge.io/config_javadoc.html#JavadocMethod -->
+          <failOnViolation>false</failOnViolation>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
   <profiles>
     <profile>
       <id>examples-stress</id>