[Plexus-svn] SF.net SVN: plexus:[878] trunk/plexus-graph/src/main/config/checkstyle/ checkstyle.xml
Status: Alpha
Brought to you by:
rconner
|
From: <rc...@us...> - 2010-09-14 15:50:28
|
Revision: 878
http://plexus.svn.sourceforge.net/plexus/?rev=878&view=rev
Author: rconner
Date: 2010-09-14 15:50:21 +0000 (Tue, 14 Sep 2010)
Log Message:
-----------
More checks than you can shake a stick at
Modified Paths:
--------------
trunk/plexus-graph/src/main/config/checkstyle/checkstyle.xml
Modified: trunk/plexus-graph/src/main/config/checkstyle/checkstyle.xml
===================================================================
--- trunk/plexus-graph/src/main/config/checkstyle/checkstyle.xml 2010-09-14 01:26:38 UTC (rev 877)
+++ trunk/plexus-graph/src/main/config/checkstyle/checkstyle.xml 2010-09-14 15:50:21 UTC (rev 878)
@@ -4,60 +4,61 @@
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<!--
+ Checkstyle configuration for Plexus.
+-->
- Checkstyle configuration patterned after sun_checks.xml, which is included
- in the maven-checkstyle-plugin jar.
+<module name="Checker">
- The original checkstyle config checks the sun coding conventions from:
- - the Java Language Specification at
- http://java.sun.com/docs/books/jls/second_edition/html/index.html
+ <!-- Checks for Duplicate Code. -->
+ <!-- See http://checkstyle.sf.net/config_duplicates.html -->
+ <!-- Docs suggest using Simian istead. http://www.redhillconsulting.com.au/products/simian/ -->
+<!-- <module name="StrictDuplicateCode"/> -->
- - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
- - the Javadoc guidelines at
- http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
-
- - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
-
- - some best practices
-
--->
-
-<module name="Checker">
-
- <!-- Checks for Headers -->
+ <!-- Checks for Headers. -->
<!-- See http://checkstyle.sf.net/config_header.html -->
+<!-- <module name="Header"/> -->
<module name="RegexpHeader">
<property name="headerFile" value="${checkstyle.header.file}" />
</module>
+
+ <!-- Checks for Javadoc Comments. -->
+ <!-- See http://checkstyle.sf.net/config_javadoc.html -->
<!-- Checks that each Java package has a Javadoc file used for commenting. -->
- <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
- <module name="JavadocPackage">
- <property name="allowLegacy" value="true"/>
- </module>
+ <module name="JavadocPackage"/>
- <!-- Checks whether files end with a new line. -->
- <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
+
+ <!-- Miscellaneous Other Checks. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html -->
<module name="NewlineAtEndOfFile"/>
-
- <!-- Checks that property files contain the same keys. -->
- <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
<module name="Translation"/>
- <module name="FileLength"/>
- <module name="FileTabCharacter">
- <property name="eachLine" value="true"/>
- </module>
-
+ <!-- Checks for General Regexes. -->
+ <!-- See http://checkstyle.sf.net/config_regexp.html -->
+<!-- <module name="RegexpMultiline"/> -->
<module name="RegexpSingleline">
<!-- \s matches whitespace character, $ matches end of line. -->
<property name="format" value="\s+$"/>
<property name="message" value="Line has trailing spaces."/>
</module>
+
+ <!-- Checks for Size Violations. -->
+ <!-- See http://checkstyle.sf.net/config_sizes.html -->
+ <module name="FileLength"/>
+
+
+ <!-- Checks for Whitespace. -->
+ <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+ <module name="FileTabCharacter">
+ <property name="eachLine" value="true"/>
+ </module>
+
+
+
<module name="TreeWalker">
<property name="cacheFile" value="${checkstyle.cache.file}"/>
@@ -65,56 +66,200 @@
<property name="tabWidth" value="4"/>
- <!-- Checks for Javadoc comments. -->
+ <!-- Checks for Annotations. -->
+ <!-- See http://checkstyle.sf.net/config_annotation.html -->
+ <module name="AnnotationUseStyle"/>
+ <module name="MissingDeprecated"/>
+ <module name="MissingOverride"/>
+ <module name="PackageAnnotation"/>
+ <module name="SuppressWarnings"/>
+
+
+ <!-- Checks for Blocks. You know, those {}'s -->
+ <!-- See http://checkstyle.sf.net/config_blocks.html -->
+ <module name="AvoidNestedBlocks"/>
+ <module name="EmptyBlock">
+ <property name="option" value="text"/>
+ </module>
+ <module name="LeftCurly">
+ <property name="option" value="eol" />
+ <property name="tokens" value="LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE" />
+ </module>
+ <module name="LeftCurly">
+ <property name="option" value="nl" />
+ <property name="tokens" value="CLASS_DEF, CTOR_DEF, INTERFACE_DEF, METHOD_DEF" />
+ </module>
+ <module name="NeedBraces"/>
+ <module name="RightCurly"/>
+
+
+ <!-- Checks for Class Design. -->
+ <!-- See http://checkstyle.sf.net/config_design.html -->
+ <!-- FIXME: temprorary -->
+<!-- <module name="DesignForExtension"/> -->
+ <module name="FinalClass"/>
+ <module name="HideUtilityClassConstructor"/>
+ <module name="InterfaceIsType"/>
+ <module name="MutableException"/>
+ <module name="VisibilityModifier">
+ <property name="packageAllowed" value="true"/>
+ </module>
+<!-- <module name="ThrowsCount"/> -->
+
+
+ <!-- Checks for Common Coding Problems. -->
+ <!-- See http://checkstyle.sf.net/config_coding.html -->
+ <module name="ArrayTrailingComma"/>
+ <!-- Omitting, perhaps permanently -->
+<!-- <module name="AvoidInlineConditionals"/> -->
+ <module name="CovariantEquals"/>
+ <module name="DeclarationOrder"/>
+ <module name="DefaultComesLast"/>
+ <module name="DoubleCheckedLocking"/>
+ <module name="EmptyStatement"/>
+ <module name="EqualsAvoidNull"/>
+ <module name="EqualsHashCode"/>
+ <module name="ExplicitInitialization"/>
+ <module name="FallThrough"/>
+ <module name="FinalLocalVariable"/>
+ <module name="HiddenField">
+ <property name="ignoreSetter" value="true"/>
+ <property name="ignoreConstructorParameter" value="true"/>
+ </module>
+ <module name="IllegalCatch"/>
+ <module name="IllegalInstantiation"/>
+ <module name="IllegalThrows"/>
+ <module name="IllegalToken">
+ <property name="tokens" value="LABELED_STAT, LITERAL_NATIVE"/>
+ </module>
+<!-- <module name="IllegalTokenText"/> -->
+ <module name="IllegalType"/>
+ <module name="InnerAssignment"/>
+ <module name="JUnitTestCase"/>
+ <module name="MagicNumber">
+ <!-- FIXME: temporary. Excluding the magic numbers I'm using for hash codes -->
+ <property name="ignoreNumbers" value="-1, 0, 1, 2, 17, 37"/>
+ </module>
+ <module name="MissingCtor"/>
+ <module name="MissingSwitchDefault"/>
+ <module name="ModifiedControlVariable"/>
+ <module name="MultipleStringLiterals"/>
+ <module name="MultipleVariableDeclarations"/>
+ <module name="NestedIfDepth"/>
+ <module name="NestedTryDepth"/>
+ <module name="NoClone"/>
+ <module name="NoFinalizer"/>
+ <module name="PackageDeclaration"/>
+ <module name="ParameterAssignment"/>
+ <module name="RedundantThrows"/>
+<!-- <module name="RequireThis"/> -->
+<!-- <module name="ReturnCount"/> -->
+ <module name="SimplifyBooleanExpression"/>
+ <module name="SimplifyBooleanReturn"/>
+ <module name="StringLiteralEquality"/>
+ <module name="SuperClone"/>
+ <module name="SuperFinalize"/>
+ <module name="UnnecessaryParentheses"/>
+
+
+ <!-- Checks for Imports. -->
+ <!-- See http://checkstyle.sf.net/config_import.html -->
+ <module name="AvoidStarImport"/>
+ <module name="AvoidStaticImport"/>
+ <module name="IllegalImport"/>
+<!-- <module name="ImportControl"/> -->
+ <module name="ImportOrder"/>
+ <module name="RedundantImport"/>
+ <module name="UnusedImports"/>
+
+
+ <!-- Checks for Javadoc Comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<!-- FIXME: temporary
<module name="JavadocMethod">
<property name="scope" value="protected"/>
</module>
+ <module name="JavadocStyle"/>
<module name="JavadocType">
<property name="scope" value="protected"/>
</module>
<module name="JavadocVariable">
<property name="scope" value="protected"/>
</module>
- <module name="JavadocStyle"/>
+ <module name="WriteTag"/>
-->
+
+ <!-- Checks for Metrics. -->
+ <!-- See http://checkstyle.sf.net/config_metrics.html -->
+ <module name="BooleanExpressionComplexity"/>
+ <module name="ClassDataAbstractionCoupling"/>
+ <module name="ClassFanOutComplexity"/>
+ <module name="CyclomaticComplexity"/>
+ <module name="JavaNCSS"/>
+ <module name="NPathComplexity"/>
+
+
+ <!-- Miscellaneous Other Checks. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html -->
+ <module name="ArrayTypeStyle"/>
+ <module name="DescendantToken"/>
+ <module name="FinalParameters"/>
+ <module name="Indentation"/>
+<!-- <module name="Regexp"/> -->
+ <module name="TodoComment"/>
+ <module name="TrailingComment"/>
+ <module name="UncommentedMain"/>
+ <module name="UpperEll"/>
+
+
+ <!-- Checks for Modifiers. -->
+ <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+ <module name="ModifierOrder"/>
+ <!-- Omitting, perhaps permanently -->
+<!-- <module name="RedundantModifier"/> -->
+
+
<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
+ <module name="AbstractClassName"/>
+ <module name="ClassTypeParameterName"/>
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
+ <module name="MethodTypeParameterName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
- <!-- 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 General Regexes. -->
+ <!-- See http://checkstyle.sf.net/config_regexp.html -->
+<!-- <module name="RegexpSinglelineJava"/> -->
<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
+ <module name="AnonInnerLength"/>
+ <module name="ExecutableStatementCount"/>
<module name="LineLength">
<property name="max" value="120" />
</module>
<module name="MethodLength"/>
+ <module name="OuterTypeNumber"/>
<module name="ParameterNumber"/>
- <!-- Checks for whitespace -->
+ <!-- Checks for Whitespace. -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
+ <module name="EmptyForInitializerPad"/>
<module name="EmptyForIteratorPad">
<property name="option" value="space"/>
</module>
+ <module name="GenericWhitespace"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter">
<!-- Omitting: ARRAY_INIT, TYPECAST -->
@@ -134,77 +279,6 @@
<property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_ASSERT, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_RETURN, LITERAL_TRY, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXTENSION_AND" />
</module>
- <!-- Modifier Checks -->
- <!-- See http://checkstyle.sf.net/config_modifiers.html -->
- <module name="ModifierOrder"/>
- <!-- Omitting, perhaps permanently
- <module name="RedundantModifier"/>
- -->
-
-
- <!-- Checks for blocks. You know, those {}'s -->
- <!-- See http://checkstyle.sf.net/config_blocks.html -->
- <module name="AvoidNestedBlocks"/>
- <module name="EmptyBlock">
- <property name="option" value="text"/>
- </module>
- <module name="LeftCurly">
- <property name="option" value="eol" />
- <property name="tokens" value="LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE" />
- </module>
- <module name="LeftCurly">
- <property name="option" value="nl" />
- <property name="tokens" value="CLASS_DEF, CTOR_DEF, INTERFACE_DEF, METHOD_DEF" />
- </module>
- <module name="NeedBraces"/>
- <module name="RightCurly"/>
-
-
- <!-- Checks for common coding problems -->
- <!-- See http://checkstyle.sf.net/config_coding.html -->
- <!-- Omitting, perhaps permanently
- <module name="AvoidInlineConditionals"/>
- -->
- <module name="DoubleCheckedLocking"/>
- <module name="EmptyStatement"/>
- <module name="EqualsHashCode"/>
- <module name="HiddenField">
- <property name="ignoreSetter" value="true"/>
- <property name="ignoreConstructorParameter" value="true"/>
- </module>
- <module name="IllegalInstantiation"/>
- <module name="InnerAssignment"/>
- <module name="MagicNumber">
- <!-- FIXME: temporary. Excluding the magic numbers I'm using for hash codes -->
- <property name="ignoreNumbers" value="-1, 0, 1, 2, 17, 37"/>
- </module>
- <module name="MissingSwitchDefault"/>
- <module name="RedundantThrows"/>
- <module name="SimplifyBooleanExpression"/>
- <module name="SimplifyBooleanReturn"/>
-
- <!-- Checks for class design -->
- <!-- See http://checkstyle.sf.net/config_design.html -->
- <!-- FIXME: temporary
- <module name="DesignForExtension"/>
- -->
- <module name="FinalClass"/>
- <module name="HideUtilityClassConstructor"/>
- <module name="InterfaceIsType"/>
- <module name="VisibilityModifier">
- <property name="packageAllowed" value="true"/>
- </module>
-
-
- <!-- Miscellaneous other checks. -->
- <!-- See http://checkstyle.sf.net/config_misc.html -->
- <module name="ArrayTypeStyle"/>
- <!-- FIXME: temporary
- <module name="FinalParameters"/>
- -->
- <module name="TodoComment"/>
- <module name="UpperEll"/>
-
</module>
</module>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|