cmlenz 2003/01/21 05:05:54
Modified: . checkstyle.xml
Log:
Some checkstyle refinements:
- Actually add classes to the IllegalInstanation check, namely String and
Boolean. Instantiating those is considered bad practice and is
unnecessary
- Add a regexp-based check for finalizers, which should not be used by
any normal code
- Add LITERAL_CATCH token to the EmptyBlock check, don't know if that's
necessary, but that's what's in the Checkstyle examples
Revision Changes Path
1.11 +11 -2 jakarta-cactus/checkstyle.xml
Index: checkstyle.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/checkstyle.xml,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- checkstyle.xml 8 Jan 2003 23:26:13 -0000 1.10
+++ checkstyle.xml 21 Jan 2003 13:05:54 -0000 1.11
@@ -39,6 +39,7 @@
<!-- Code formatting -->
<module name="EmptyBlock">
+ <property name="tokens" value="LITERAL_CATCH"/>
<property name="option" value="text"/>
</module>
<module name="NeedBraces"/>
@@ -67,7 +68,9 @@
<!-- Coding style -->
<module name="EqualsHashCode"/>
- <module name="IllegalInstantiation"/>
+ <module name="IllegalInstantiation">
+ <property name="classes" value="java.lang.Boolean, java.lang.String"/>
+ </module>
<module name="InnerAssignment"/>
<module name="MethodLength"/>
<module name="ModifierOrder"/>
@@ -81,7 +84,13 @@
<property name="protectedAllowed" value="true"/>
<property name="publicMemberPattern" value="^[a-z][a-zA-Z0-9]*$"/>
</module>
-
+ <module name="GenericIllegalRegexp">
+ <!-- Avoid finalizers
+ (this will not find violations that contain linebreaks) -->
+ <property name="format"
+ value="((public)|(protected))\s+void\s+finalize\(\s*\)"/>
+ </module>
+
<!-- Javadoc related checks -->
<module name="JavadocType">
<property name="scope" value="private"/>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>