Thread: [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.
|
|
From: <chr...@us...> - 2007-06-30 17:12:41
|
Revision: 482
http://svn.sourceforge.net/japi/?rev=482&view=rev
Author: christianhujer
Date: 2007-06-30 10:12:40 -0700 (Sat, 30 Jun 2007)
Log Message:
-----------
Changed a comment to not be mistaken for an open todo.
Modified Paths:
--------------
common/trunk/sun_checks.xml
Modified: common/trunk/sun_checks.xml
===================================================================
--- common/trunk/sun_checks.xml 2007-06-30 17:11:53 UTC (rev 481)
+++ common/trunk/sun_checks.xml 2007-06-30 17:12:40 UTC (rev 482)
@@ -190,7 +190,7 @@
<property name="format" value="\s+$"/>
<property name="message" value="Line has trailing spaces."/>
</module>
- <!-- Disabled because we use different means of filtering out todo comments. -->
+ <!-- Disabled because we use different means of filtering out such comments. -->
<!--module name="TodoComment"/-->
<module name="UpperEll"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-07 08:48:50
|
Revision: 506
http://svn.sourceforge.net/japi/?rev=506&view=rev
Author: christianhujer
Date: 2007-07-07 01:48:43 -0700 (Sat, 07 Jul 2007)
Log Message:
-----------
[ 1749527 ] checkstyle fails on windows
Modified Paths:
--------------
common/trunk/sun_checks.xml
Modified: common/trunk/sun_checks.xml
===================================================================
--- common/trunk/sun_checks.xml 2007-07-06 22:11:47 UTC (rev 505)
+++ common/trunk/sun_checks.xml 2007-07-07 08:48:43 UTC (rev 506)
@@ -41,7 +41,9 @@
<!-- Checks whether files end with a new line. -->
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
- <module name="NewlineAtEndOfFile"/>
+ <module name="NewlineAtEndOfFile">
+ <property name="lineSeparator" value="lf" />
+ </module>
<!-- Checks that property files contain the same keys. -->
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-09 21:53:17
|
Revision: 530
http://svn.sourceforge.net/japi/?rev=530&view=rev
Author: christianhujer
Date: 2007-07-09 14:53:16 -0700 (Mon, 09 Jul 2007)
Log Message:
-----------
Enabled cache in checkstyle.
Modified Paths:
--------------
common/trunk/sun_checks.xml
Modified: common/trunk/sun_checks.xml
===================================================================
--- common/trunk/sun_checks.xml 2007-07-09 21:44:48 UTC (rev 529)
+++ common/trunk/sun_checks.xml 2007-07-09 21:53:16 UTC (rev 530)
@@ -52,6 +52,9 @@
<module name="TreeWalker">
+ <property name="cacheFile" value="docs/checkstyleCache" />
+
+
<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<!-- Disabled because it throws an exception.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|