You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by eb...@apache.org on 2013/11/26 16:50:22 UTC

svn commit: r1545691 - in /commons/proper/imaging/trunk: checkstyle.xml pom.xml src/conf/ src/conf/HEADER.txt src/conf/checkstyle-suppressions.xml src/conf/checkstyle.xml

Author: ebourg
Date: Tue Nov 26 15:50:22 2013
New Revision: 1545691

URL: http://svn.apache.org/r1545691
Log:
Beef up the checkstyle configuration

Added:
    commons/proper/imaging/trunk/src/conf/
    commons/proper/imaging/trunk/src/conf/HEADER.txt   (with props)
    commons/proper/imaging/trunk/src/conf/checkstyle-suppressions.xml
      - copied, changed from r1511612, commons/proper/configuration/trunk/conf/checkstyle-suppressions.xml
    commons/proper/imaging/trunk/src/conf/checkstyle.xml
      - copied, changed from r1545174, commons/proper/imaging/trunk/checkstyle.xml
Removed:
    commons/proper/imaging/trunk/checkstyle.xml
Modified:
    commons/proper/imaging/trunk/pom.xml

Modified: commons/proper/imaging/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/pom.xml?rev=1545691&r1=1545690&r2=1545691&view=diff
==============================================================================
--- commons/proper/imaging/trunk/pom.xml (original)
+++ commons/proper/imaging/trunk/pom.xml Tue Nov 26 15:50:22 2013
@@ -240,7 +240,10 @@
         <version>2.11</version>
         <inherited>false</inherited>
         <configuration>
-          <configLocation>${basedir}/checkstyle.xml</configLocation>
+          <configLocation>${basedir}/src/conf/checkstyle.xml</configLocation>
+          <suppressionsLocation>${basedir}/src/conf/checkstyle-suppressions.xml</suppressionsLocation>
+          <enableRulesSummary>false</enableRulesSummary>
+          <propertyExpansion>basedir=${basedir}</propertyExpansion>
         </configuration>
         <!-- Work around CHECKSTYLE-172 -->
         <reportSets>

Added: commons/proper/imaging/trunk/src/conf/HEADER.txt
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/conf/HEADER.txt?rev=1545691&view=auto
==============================================================================
--- commons/proper/imaging/trunk/src/conf/HEADER.txt (added)
+++ commons/proper/imaging/trunk/src/conf/HEADER.txt Tue Nov 26 15:50:22 2013
@@ -0,0 +1,16 @@
+/*
+ * 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.
+ */
\ No newline at end of file

Propchange: commons/proper/imaging/trunk/src/conf/HEADER.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: commons/proper/imaging/trunk/src/conf/HEADER.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: commons/proper/imaging/trunk/src/conf/checkstyle-suppressions.xml (from r1511612, commons/proper/configuration/trunk/conf/checkstyle-suppressions.xml)
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/conf/checkstyle-suppressions.xml?p2=commons/proper/imaging/trunk/src/conf/checkstyle-suppressions.xml&p1=commons/proper/configuration/trunk/conf/checkstyle-suppressions.xml&r1=1511612&r2=1545691&rev=1545691&view=diff
==============================================================================
--- commons/proper/configuration/trunk/conf/checkstyle-suppressions.xml (original)
+++ commons/proper/imaging/trunk/src/conf/checkstyle-suppressions.xml Tue Nov 26 15:50:22 2013
@@ -26,10 +26,4 @@
 
 <suppressions>
 
-    <suppress checks="MissingSwitchDefault" files="PropertiesConfiguration.java"/>
-
-    <suppress checks="DoubleCheckedLocking" files="DynamicCombinedConfiguration.java"
-      lines="800-900"/>
-
-    <suppress files="FileUtils\.java" checks="[a-zA-Z0-9]*"/>
 </suppressions>

Copied: commons/proper/imaging/trunk/src/conf/checkstyle.xml (from r1545174, commons/proper/imaging/trunk/checkstyle.xml)
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/conf/checkstyle.xml?p2=commons/proper/imaging/trunk/src/conf/checkstyle.xml&p1=commons/proper/imaging/trunk/checkstyle.xml&r1=1545174&r2=1545691&rev=1545691&view=diff
==============================================================================
--- commons/proper/imaging/trunk/checkstyle.xml (original)
+++ commons/proper/imaging/trunk/src/conf/checkstyle.xml Tue Nov 26 15:50:22 2013
@@ -23,19 +23,153 @@ limitations under the License.
 <!-- Commons Imaging customization of default Checkstyle behavior -->
 
 <module name="Checker">
-  <module name="FileTabCharacter">
-    <property name="eachLine" value="true"/>
-    <property name="fileExtensions" value="java, xml"/>
-  </module>
-  <module name="NewlineAtEndOfFile">
-    <property name="fileExtensions" value="java, xml"/>
-  </module>
-  <module name="TreeWalker">
-    <property name="cacheFile" value="target/cachefile"/>
-    <module name="AvoidStarImport"/>
-    <module name="RedundantImport"/>
-    <module name="UnusedImports"/>
-    <module name="NeedBraces"/>
-  </module>
-</module>
+    <property name="localeLanguage" value="en" />
+
+    <!-- Checks that a package.html file exists for each package.     -->
+    <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
+    <!--
+    <module name="JavadocPackage">
+      <property name="allowLegacy" value="true"/>
+    </module>
+    -->
+
+    <!-- Checks whether files end with a new line.                        -->
+    <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
+    <module name="NewlineAtEndOfFile"/>
+
+    <!-- Checks for Headers                              -->
+    <!-- See http://checkstyle.sf.net/config_header.html -->
+    <module name="Header">
+        <property name="headerFile" value="${basedir}/src/conf/HEADER.txt"/>
+    </module>
+  
+    <!-- Exceptions -->
+    <module name="SuppressionFilter">
+        <property name="file" value="${checkstyle.suppressions.file}"/>
+    </module>
+
+    <module name="FileTabCharacter"/>
+    <!--
+    <module name="RegexpSingleline">
+        <property name="format" value="\s+$"/>
+        <property name="message" value="Line has trailing spaces."/>
+    </module>
+    -->
+    <module name="FileLength"/>
+
+    <module name="TreeWalker">
+
+        <property name="cacheFile" value="${checkstyle.cache.file}"/>
+
+        <!-- Checks for Javadoc comments.                     -->
+        <!-- See http://checkstyle.sf.net/config_javadoc.html -->
+        <!--
+        <module name="JavadocMethod">
+            <property name="scope" value="public"/>
+            <property name="allowUndeclaredRTE" value="true"/>
+	    <property name="allowMissingJavadoc" value="true"/>
+        </module>
+        <module name="JavadocType">
+        </module>
+        <module name="JavadocVariable"/>
+        -->
+
+
+        <!-- Checks for Naming Conventions.                  -->
+        <!-- See http://checkstyle.sf.net/config_naming.html -->
+        <module name="ConstantName"/>
+        <module name="LocalFinalVariableName"/>
+        <module name="LocalVariableName"/>
+        <module name="MemberName"/>
+        <module name="MethodName"/>
+        <module name="PackageName"/>
+        <module name="ParameterName"/>
+        <module name="StaticVariableName"/>
+        <module name="TypeName"/>
+
+
+        <!-- Following interprets the header file as regular expressions. -->
+        <!-- <module name="RegexpHeader"/>                                -->
+
+
+        <!-- Checks for imports                              -->
+        <!-- See http://checkstyle.sf.net/config_import.html -->
+        <module name="AvoidStarImport"/>
+        <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
+        <module name="RedundantImport"/>
+        <module name="UnusedImports"/>
 
+
+        <!-- Checks for Size Violations.                    -->
+        <!-- See http://checkstyle.sf.net/config_sizes.html -->
+        <module name="LineLength">
+            <property name="max" value="120"/>
+        </module>
+        <module name="MethodLength"/>
+        <module name="ParameterNumber"/>
+
+
+        <!-- Checks for whitespace                               -->
+        <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+        <module name="EmptyForIteratorPad"/>
+        <module name="OperatorWrap"/>
+        <module name="ParenPad"/>
+        <module name="WhitespaceAfter"/>
+        <module name="WhitespaceAround"/>
+        <module name="GenericWhitespace"/>
+
+
+        <!-- Modifier Checks                                    -->
+        <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+        <module name="ModifierOrder"/>
+        <module name="RedundantModifier"/>
+
+
+        <!-- Checks for blocks. You know, those {}'s         -->
+        <!-- See http://checkstyle.sf.net/config_blocks.html -->
+        <module name="AvoidNestedBlocks"/>
+        <module name="EmptyBlock"/>
+        <module name="NeedBraces"/>
+
+        <!-- Checks for common coding problems               -->
+        <!-- See http://checkstyle.sf.net/config_coding.html -->
+        <module name="CovariantEquals"/>
+        <module name="EqualsHashCode"/>
+        <module name="IllegalInstantiation"/>
+        <module name="InnerAssignment"/>
+        <module name="MagicNumber">
+            <property name="ignoreNumbers" value="-1,0,1,2,3,8,16,24,32,255"/>
+        </module>
+        <module name="RedundantThrows">
+            <property name="allowUnchecked" value="true"/>
+        </module>
+        <module name="SimplifyBooleanExpression"/>
+        <module name="SimplifyBooleanReturn"/>
+        <module name="StringLiteralEquality"/>
+        <module name="SuperClone"/>
+        <module name="SuperFinalize"/>
+        <module name="DeclarationOrder"/>
+        <module name="ExplicitInitialization"/>
+        <module name="DefaultComesLast"/>
+        <module name="FallThrough"/>
+        <module name="MultipleVariableDeclarations"/>
+        <module name="UnnecessaryParentheses"/>
+
+        <!-- Checks for class design                         -->
+        <!-- See http://checkstyle.sf.net/config_design.html -->
+        <module name="FinalClass"/>
+        <module name="HideUtilityClassConstructor"/>
+        <!--
+        <module name="VisibilityModifier">
+            <property name="protectedAllowed" value="true"/>
+        </module>
+        -->
+
+        <!-- Miscellaneous other checks.                   -->
+        <!-- See http://checkstyle.sf.net/config_misc.html -->
+        <module name="ArrayTypeStyle"/>
+        <module name="UpperEll"/>
+
+    </module>
+
+</module>