You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2015/11/19 23:16:21 UTC
svn commit: r1715298 - in /commons/proper/validator/trunk:
checkstyle-suppressions.xml checkstyle.xml pom.xml
Author: sebb
Date: Thu Nov 19 22:16:21 2015
New Revision: 1715298
URL: http://svn.apache.org/viewvc?rev=1715298&view=rev
Log:
Allow Checkstyle checks to be overridden where necessary
Added:
commons/proper/validator/trunk/checkstyle-suppressions.xml (with props)
Modified:
commons/proper/validator/trunk/checkstyle.xml
commons/proper/validator/trunk/pom.xml
Added: commons/proper/validator/trunk/checkstyle-suppressions.xml
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/checkstyle-suppressions.xml?rev=1715298&view=auto
==============================================================================
--- commons/proper/validator/trunk/checkstyle-suppressions.xml (added)
+++ commons/proper/validator/trunk/checkstyle-suppressions.xml Thu Nov 19 22:16:21 2015
@@ -0,0 +1,28 @@
+<?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">
+<!-- SEE: http://checkstyle.sourceforge.net/config.html#Examples -->
+<suppressions>
+ <suppress checks="ParameterNumber" files="Field.java"/> <!-- two private methods -->
+
+ <!-- Maven generated code -->
+ <suppress checks=".*" files="[/\\]target[/\\]"/>
+</suppressions>
Propchange: commons/proper/validator/trunk/checkstyle-suppressions.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: commons/proper/validator/trunk/checkstyle.xml
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/checkstyle.xml?rev=1715298&r1=1715297&r2=1715298&view=diff
==============================================================================
--- commons/proper/validator/trunk/checkstyle.xml (original)
+++ commons/proper/validator/trunk/checkstyle.xml Thu Nov 19 22:16:21 2015
@@ -149,4 +149,20 @@
<property name="fileExtensions" value="java,xml"/>
</module>
+ <module name="SuppressionCommentFilter"/>
+
+ <module name="SuppressionFilter">
+ <!-- config_loc is used by Eclipse plugin -->
+ <property name="file" value="${config_loc}/checkstyle-suppressions.xml"/>
+ </module>
+
+ <!--
+ Allow comment to suppress checkstyle for a single line
+ e.g. // CHECKSTYLE IGNORE MagicNumber
+ -->
+ <module name="SuppressWithNearbyCommentFilter">
+ <property name="commentFormat" value="CHECKSTYLE IGNORE (\w+)"/>
+ <property name="checkFormat" value="$1"/>
+ </module>
+
</module>
Modified: commons/proper/validator/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/validator/trunk/pom.xml?rev=1715298&r1=1715297&r2=1715298&view=diff
==============================================================================
--- commons/proper/validator/trunk/pom.xml (original)
+++ commons/proper/validator/trunk/pom.xml Thu Nov 19 22:16:21 2015
@@ -157,6 +157,7 @@
<maven.compiler.target>1.6</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <checkstyle.plugin.version>2.16</checkstyle.plugin.version>
</properties>
<build>
@@ -193,6 +194,17 @@
</ignorePathsToDelete>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>${checkstyle.plugin.version}</version>
+ <configuration>
+ <configLocation>${basedir}/checkstyle.xml</configLocation>
+ <!-- Needed to define config_loc -->
+ <propertyExpansion>config_loc=${basedir}</propertyExpansion>
+ <enableRulesSummary>false</enableRulesSummary>
+ </configuration>
+ </plugin>
</plugins>
</build>
@@ -247,9 +259,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.16</version>
+ <version>${checkstyle.plugin.version}</version>
<configuration>
<configLocation>${basedir}/checkstyle.xml</configLocation>
+ <!-- Needed to define config_loc -->
+ <propertyExpansion>config_loc=${basedir}</propertyExpansion>
<enableRulesSummary>false</enableRulesSummary>
</configuration>
<reportSets>