commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r1005273 - in /commons/proper/chain/trunk: checkstyle.xml pom.xml
Date Wed, 06 Oct 2010 22:06:08 GMT
Author: niallp
Date: Wed Oct  6 22:06:08 2010
New Revision: 1005273

URL: http://svn.apache.org/viewvc?rev=1005273&view=rev
Log:
Upgrade maven-checkstyle-plugin from version 2.1 to 2.6

maven-checkstyle-plugin 2.4 onwards uses Checkstyle 5.0 (upgraded from Checkstyle 4.4).

Checkstyle 5.0 is not 100% backwardly compatible with release 4.4 and the following changes
need to be made to make it work:

* Replace "PackageHtml" with "JavadocPackage" and configure the "allowLegacy" parameter so
that it checks for package.html files (rather than package-info.java)
* Move "Header" out of "TreeWalker"(not allowed)
* Move "FileLength" out of "TreeWalker"(not allowed)
* Replace "TabCharacter" (java files) with "FileTabCharacter", move it out of "TreeWalker"
and configure the "fileExtensions" parameter
* Replace "GenericIllegalRegexp" (for trailing spaces check) with "RegexpSingleline", move
it out of "TreeWalker"

See the Release Notes for incompatible changes and fixes here:
    http://checkstyle.sourceforge.net/releasenotes.html

Modified:
    commons/proper/chain/trunk/checkstyle.xml
    commons/proper/chain/trunk/pom.xml

Modified: commons/proper/chain/trunk/checkstyle.xml
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/checkstyle.xml?rev=1005273&r1=1005272&r2=1005273&view=diff
==============================================================================
--- commons/proper/chain/trunk/checkstyle.xml (original)
+++ commons/proper/chain/trunk/checkstyle.xml Wed Oct  6 22:06:08 2010
@@ -27,7 +27,10 @@
   
       <!-- Checks that a package.html file exists for each package.     -->
       <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
-      <module name="PackageHtml"/>
+      <module name="JavadocPackage">
+          <!-- setting allowLegacy means it will check for package.html instead of just
package-info.java -->
+          <property name="allowLegacy" value="true"/>
+      </module>
   
       <!-- Checks whether files end with a new line.                        -->
       <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
@@ -37,6 +40,21 @@
       <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
       <module name="Translation"/>
   
+      <module name="Header">
+          <property name="headerFile" value="${checkstyle.header.file}"/>
+      </module>
+
+      <module name="FileLength"/>
+
+      <module name="FileTabCharacter">
+          <property name="fileExtensions" value="java,xml"/>
+      </module>
+
+      <module name="RegexpSingleline">
+          <property name="format" value="\s+$"/>
+          <property name="message" value="Line has trailing spaces."/>
+      </module>
+
       <module name="TreeWalker">
   
           <!--property name="cacheFile" value="${checkstyle.cache.file}"/-->
@@ -44,9 +62,6 @@
           <!-- ************************************************************** -->
           <!-- Checks that are different from the sun coding conventions ones -->
           <!-- ************************************************************** -->
-          <module name="Header">
-              <property name="headerFile" value="${checkstyle.header.file}"/>
-          </module>
           <property name="tabWidth" value="4"/>
           <module name="LeftCurly">
             <property name="option" value="eol"/>
@@ -106,7 +121,6 @@
   
           <!-- Checks for Size Violations.                    -->
           <!-- See http://checkstyle.sf.net/config_sizes.html -->
-          <module name="FileLength"/>
           <module name="ParameterNumber"/>
   
   
@@ -116,7 +130,6 @@
           <module name="NoWhitespaceAfter"/>
           <module name="NoWhitespaceBefore"/>
           <!-- module name="OperatorWrap"/ -->
-          <module name="TabCharacter"/>
           <module name="WhitespaceAfter">
              <property name="tokens" value="COMMA, SEMI"/>
           </module>
@@ -167,10 +180,6 @@
           <!-- See http://checkstyle.sf.net/config_misc.html -->
           <module name="ArrayTypeStyle"/>
           <!-- module name="FinalParameters"/ -->
-          <module name="GenericIllegalRegexp">
-              <property name="format" value="\s+$"/>
-              <property name="message" value="Line has trailing spaces."/>
-          </module>
           <module name="TodoComment"/>
           <module name="UpperEll"/>
   

Modified: commons/proper/chain/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/pom.xml?rev=1005273&r1=1005272&r2=1005273&view=diff
==============================================================================
--- commons/proper/chain/trunk/pom.xml (original)
+++ commons/proper/chain/trunk/pom.xml Wed Oct  6 22:06:08 2010
@@ -250,7 +250,7 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-checkstyle-plugin</artifactId>
-                <version>2.1</version>
+                <version>2.6</version>
                 <configuration>
                     <configLocation>${basedir}/checkstyle.xml</configLocation>
                     <enableRulesSummary>false</enableRulesSummary>



Mime
View raw message