You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2014/08/18 16:00:34 UTC
svn commit: r1618611 - in /maven/plugins/trunk/maven-checkstyle-plugin/src:
it/check-pass/src/main/java/org/MyClass.java
main/resources/config/maven_checks.xml main/resources/config/sun_checks.xml
Author: hboutemy
Date: Mon Aug 18 14:00:33 2014
New Revision: 1618611
URL: http://svn.apache.org/r1618611
Log:
[MCHECKSTYLE-241] added SuppressWarningsFilter (introduced in Checkstyle 5.7) to support @SuppressWarnings
Modified:
maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/MyClass.java
maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/maven_checks.xml
maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/sun_checks.xml
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/MyClass.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/MyClass.java?rev=1618611&r1=1618610&r2=1618611&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/MyClass.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/it/check-pass/src/main/java/org/MyClass.java Mon Aug 18 14:00:33 2014
@@ -23,6 +23,9 @@ package org;
* Yada yada yada.
*/
public class MyClass {
+ @SuppressWarnings("checkstyle:constantname")
+ private static final int testSuppressionFilter = 0;
+
public static void main(String[] args) {
// no op
}
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/maven_checks.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/maven_checks.xml?rev=1618611&r1=1618610&r2=1618611&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/maven_checks.xml (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/maven_checks.xml Mon Aug 18 14:00:33 2014
@@ -23,7 +23,7 @@ under the License.
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<!--
- Checkstyle configuration that checks the maven coding conventions from:
+ Checkstyle configuration that checks the Maven coding conventions from:
-->
<module name="Checker">
@@ -63,6 +63,10 @@ under the License.
<property name="tabWidth" value="4"/>
+ <!-- required for SuppressWarningsFilter (and other Suppress* rules not used here) -->
+ <!-- see http://checkstyle.sourceforge.net/config_annotation.html#SuppressWarningsHolder -->
+ <module name="SuppressWarningsHolder"/>
+
<module name="LeftCurly">
<property name="option" value="nl"/>
</module>
@@ -194,4 +198,8 @@ under the License.
</module>
+ <!-- Support @SuppressWarnings (added in Checkstyle 5.7) -->
+ <!-- see http://checkstyle.sourceforge.net/config.html#SuppressWarningsFilter -->
+ <module name="SuppressWarningsFilter"/>
+
</module>
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/sun_checks.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/sun_checks.xml?rev=1618611&r1=1618610&r2=1618611&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/sun_checks.xml (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/sun_checks.xml Mon Aug 18 14:00:33 2014
@@ -72,6 +72,10 @@
<property name="cacheFile" value="${checkstyle.cache.file}"/>
+ <!-- required for SuppressWarningsFilter (and other Suppress* rules not used here) -->
+ <!-- see http://checkstyle.sourceforge.net/config_annotation.html#SuppressWarningsHolder -->
+ <module name="SuppressWarningsHolder"/>
+
<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<module name="JavadocMethod"/>
@@ -183,4 +187,8 @@
</module>
+ <!-- Support @SuppressWarnings (added in Checkstyle 5.7) -->
+ <!-- see http://checkstyle.sourceforge.net/config.html#SuppressWarningsFilter -->
+ <module name="SuppressWarningsFilter"/>
+
</module>