[Japi-cvs] SF.net SVN: japi: [431] common/trunk/sun_checks.xml
Status: Beta
Brought to you by:
christianhujer
From: <chr...@us...> - 2007-06-25 13:42:17
|
Revision: 431 http://svn.sourceforge.net/japi/?rev=431&view=rev Author: christianhujer Date: 2007-06-25 06:42:15 -0700 (Mon, 25 Jun 2007) Log Message: ----------- Changed checkstyle configuration to match the current coding standards and workaround bugs and limitations of checkstyle. Modified Paths: -------------- common/trunk/sun_checks.xml Modified: common/trunk/sun_checks.xml =================================================================== --- common/trunk/sun_checks.xml 2007-06-25 13:41:54 UTC (rev 430) +++ common/trunk/sun_checks.xml 2007-06-25 13:42:15 UTC (rev 431) @@ -34,7 +34,10 @@ <!-- Checks that a package.html file exists for each package. --> <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml --> - <module name="PackageHtml"/> + <!-- Disabled because we use package-info.java that's not yet supported by checkstyle. + ~ See also http://sourceforge.net/tracker/index.php?func=detail&aid=1228207&group_id=29721&atid=397078 + --> + <!--module name="PackageHtml"/--> <!-- Checks whether files end with a new line. --> <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> @@ -49,10 +52,14 @@ <!-- Checks for Javadoc comments. --> <!-- See http://checkstyle.sf.net/config_javadoc.html --> - <module name="JavadocMethod"/> + <!-- Disabled because it throws an exception. + ~ TODO: report issue to checkstyle developers. + --> + <!--module name="JavadocMethod"/--> <module name="JavadocType"/> <module name="JavadocVariable"/> - <module name="JavadocStyle"/> + <!-- Disabled because it gets confused with type parameters in links, e.g. {@link #foo(Collection<String>)}. --> + <!--module name="JavadocStyle"/--> <!-- Checks for Naming Conventions. --> @@ -89,15 +96,18 @@ <!-- Checks for imports --> <!-- See http://checkstyle.sf.net/config_import.html --> <module name="AvoidStarImport"/> - <module name="IllegalImport"/> <!-- defaults to sun.* packages --> + <!-- Disabled because we currently use sun.misc.Service. Blame SUN. --> + <!--module name="IllegalImport"/--> <!-- defaults to sun.* packages --> <module name="RedundantImport"/> - <module name="UnusedImports"/> + <!-- Disabled because some Javadoc checks are disabled and thus checkstyle thinks some imports are unused while they are actually used in javadoc. --> + <!--module name="UnusedImports"/--> <!-- Checks for Size Violations. --> <!-- See http://checkstyle.sf.net/config_sizes.html --> <module name="FileLength"/> - <module name="LineLength"/> + <!-- Disabled because we use longer lines. --> + <!--module name="LineLength"/--> <module name="MethodLength"/> <module name="ParameterNumber"/> @@ -106,14 +116,20 @@ <!-- See http://checkstyle.sf.net/config_whitespace.html --> <module name="EmptyForIteratorPad"/> <module name="MethodParamPad"/> - <module name="NoWhitespaceAfter"/> + <!-- changed because we use less strict whitespace check for arrays and type params. --> + <module name="NoWhitespaceAfter"> + <property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS" /> + </module> <module name="NoWhitespaceBefore"/> <module name="OperatorWrap"/> <module name="ParenPad"/> <module name="TypecastParenPad"/> <module name="TabCharacter"/> <module name="WhitespaceAfter"/> - <module name="WhitespaceAround"/> + <!-- changed because we use less strict whitespace check for arrays and type params. --> + <module name="WhitespaceAround"> + <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, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN" /> + </module> <!-- Modifier Checks --> @@ -125,7 +141,10 @@ <!-- Checks for blocks. You know, those {}'s --> <!-- See http://checkstyle.sf.net/config_blocks.html --> <module name="AvoidNestedBlocks"/> - <module name="EmptyBlock"/> + <!-- Changed block policy because sometimes we must catch but ignore it with a comment. --> + <module name="EmptyBlock"> + <property name="option" value="text" /> + </module> <module name="LeftCurly"/> <module name="NeedBraces"/> <module name="RightCurly"/> @@ -133,22 +152,30 @@ <!-- Checks for common coding problems --> <!-- See http://checkstyle.sf.net/config_coding.html --> - <module name="AvoidInlineConditionals"/> + <!-- We allow ?:. --> + <!--module name="AvoidInlineConditionals"/--> <module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE --> <module name="EmptyStatement"/> <module name="EqualsHashCode"/> - <module name="HiddenField"/> + <!-- Disabled, we allow field hiding. --> + <!--module name="HiddenField"/--> <module name="IllegalInstantiation"/> - <module name="InnerAssignment"/> - <module name="MagicNumber"/> + <!-- Disabled, we allow inner assignments in while and for conditions but there's no chance to explicitely allow these. --> + <!--module name="InnerAssignment"/--> + <!-- Disabled, we allow them in unit tests. + ~ TODO explicitely allow them in unit tests only (src/test/**/*.java). + --> + <!--module name="MagicNumber"/--> <module name="MissingSwitchDefault"/> - <module name="RedundantThrows"/> + <!-- Disabled, confusing with javadoc and trying to write really good documentation. --> + <!--module name="RedundantThrows"/--> <module name="SimplifyBooleanExpression"/> <module name="SimplifyBooleanReturn"/> <!-- Checks for class design --> <!-- See http://checkstyle.sf.net/config_design.html --> - <module name="DesignForExtension"/> + <!-- Disabled, this check is way too strict. --> + <!--module name="DesignForExtension"/--> <module name="FinalClass"/> <module name="HideUtilityClassConstructor"/> <module name="InterfaceIsType"/> @@ -163,7 +190,8 @@ <property name="format" value="\s+$"/> <property name="message" value="Line has trailing spaces."/> </module> - <module name="TodoComment"/> + <!-- Disabled because we use different means of filtering out todo comments. --> + <!--module name="TodoComment"/--> <module name="UpperEll"/> </module> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |