commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pascalschumac...@apache.org
Subject [3/3] [lang] Apply checkstyle checks to test files (closes #257)
Date Sun, 19 Mar 2017 09:14:07 GMT
Apply checkstyle checks to test files (closes  #257)

This patch enforces the code style defined by the checkstyle checks
to the test files too.

In the cases where it would just add robustness and not improve the
code's readability and maintainability (specifically - the javadoc
checks), those checks are explicitly suppressed.


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/27d3d40f
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/27d3d40f
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/27d3d40f

Branch: refs/heads/master
Commit: 27d3d40f7c6e97979d08517b0c04c1bb1774a9b2
Parents: 1731949
Author: Allon Mureinik <amureini@redhat.com>
Authored: Tue Mar 14 12:06:57 2017 +0200
Committer: pascalschumacher <pascalschumacher@gmx.net>
Committed: Sun Mar 19 10:10:50 2017 +0100

----------------------------------------------------------------------
 checkstyle-suppressions.xml | 23 +++++++++++++++++++++++
 pom.xml                     |  4 ++++
 2 files changed, 27 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/27d3d40f/checkstyle-suppressions.xml
----------------------------------------------------------------------
diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml
new file mode 100644
index 0000000..f609d3d
--- /dev/null
+++ b/checkstyle-suppressions.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE suppressions PUBLIC "-//Puppy Crawl//DTD Suppressions 1.1//EN" "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
+<suppressions>
+    <suppress checks="JavadocMethod" files=".*/test/.*"/>
+    <suppress checks="JavadocPackage" files=".*/test/.*"/>
+</suppressions>

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/27d3d40f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e606eca..90e73c5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -655,6 +655,8 @@
         <version>${checkstyle.plugin.version}</version>
         <configuration>
           <configLocation>${basedir}/checkstyle.xml</configLocation>
+          <suppressionsLocation>${basedir}/checkstyle-suppressions.xml</suppressionsLocation>
+          <includeTestSourceDirectory>true</includeTestSourceDirectory>
           <enableRulesSummary>false</enableRulesSummary>
         </configuration>
       </plugin>
@@ -669,6 +671,8 @@
         <version>${checkstyle.plugin.version}</version>
         <configuration>
           <configLocation>${basedir}/checkstyle.xml</configLocation>
+          <suppressionsLocation>${basedir}/checkstyle-suppressions.xml</suppressionsLocation>
+          <includeTestSourceDirectory>true</includeTestSourceDirectory>
           <enableRulesSummary>false</enableRulesSummary>
         </configuration>
         <reportSets>


Mime
View raw message