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/09/04 11:40:47 UTC

[commons-codec] 04/04: Add test sources to checkstyle:check

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-codec.git

commit ae667e0803fb96ae502bbc279ccd236dc1654631
Author: aherbert <ah...@apache.org>
AuthorDate: Fri Sep 4 12:40:38 2020 +0100

    Add test sources to checkstyle:check
---
 checkstyle-suppressions.xml | 7 +++++++
 pom.xml                     | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml
index 4796ea0..f0400ca 100644
--- a/checkstyle-suppressions.xml
+++ b/checkstyle-suppressions.xml
@@ -24,4 +24,11 @@ limitations under the License.
 <suppressions>
     <suppress checks="Header" files="LICENSE.txt"/>
     <suppress checks="Header" files="NOTICE.txt"/>
+    <!-- Be more lenient on tests. -->
+    <suppress checks="Javadoc" files=".*[/\\]test[/\\].*" />
+    <suppress checks="MultipleStringLiterals" files=".*[/\\]test[/\\].*" />
+    <suppress checks="DesignForExtension" files=".*[/\\]test[/\\].*" />
+    <suppress checks="LineLength" files=".*[/\\]test[/\\].*" />
+    <suppress checks="IllegalCatch" files=".*[/\\]test[/\\].*" />
+    <suppress checks="MethodLength" files="(MersenneTwister64|Well44497[ab]|MultiplyWithCarry256)Test" />
 </suppressions>
diff --git a/pom.xml b/pom.xml
index fcf0685..91b1276 100644
--- a/pom.xml
+++ b/pom.xml
@@ -332,6 +332,7 @@ limitations under the License.
           <configLocation>${basedir}/checkstyle.xml</configLocation>
           <enableRulesSummary>false</enableRulesSummary>
           <headerFile>${basedir}/LICENSE-header.txt</headerFile>
+          <includeTestSourceDirectory>true</includeTestSourceDirectory>
           <resourceExcludes>NOTICE.txt,LICENSE.txt,**/pom.properties,**/sha512.properties</resourceExcludes>
         </configuration>
       </plugin>
@@ -367,6 +368,7 @@ limitations under the License.
           <configLocation>${basedir}/checkstyle.xml</configLocation>
           <enableRulesSummary>false</enableRulesSummary>
           <headerFile>${basedir}/LICENSE-header.txt</headerFile>
+          <includeTestSourceDirectory>true</includeTestSourceDirectory>
         </configuration>
         <!-- We need to specify reportSets because 2.9.1 creates two reports -->
         <reportSets>