ceki 2003/03/18 13:20:38
Modified: . build.xml
Added: src sun_checks.xml
Log:
Using checksyle 3.0
Revision Changes Path
1.56 +24 -4 jakarta-log4j/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-log4j/build.xml,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- build.xml 11 Mar 2003 04:24:50 -0000 1.55
+++ build.xml 18 Mar 2003 21:20:38 -0000 1.56
@@ -283,6 +283,16 @@
<!-- ================================================================= -->
+ <!-- Define the set of files current styled -->
+ <!-- ================================================================= -->
+ <fileset dir="${java.source.dir}" id="checkstyled_files">
+ <include name="org/apache/log4j/*.java"/>
+ <include name="**/plugins/*.java"/>
+ <include name="**/chainsaw/*.java"/>
+ </fileset>
+
+
+ <!-- ================================================================= -->
<!-- Runs jalopy. Available from http://jalopy.sourceforge.net -->
<!-- ================================================================= -->
<target name="runJalopy">
@@ -325,10 +335,20 @@
classpath="${checkstyle.jar}"/>
<!-- by default checkstyle supports the Sun coding standard. -->
- <checkstyle>
- <fileset refid="styled_files"/>
- <property key="checkstyle.ignore.public.in.interface"
value="true" />
- <property key="checkstyle.allow.protected" value="true" />
+ <checkstyle config="src/sun_checks.xml">
+ <fileset refid="checkstyled_files"/>
+ <!-- allow public in interfaces even if redundant -->
+ <property key="checkstyle.ignore.public.in.interface" value="true" />
+ <!-- do not check javadocs -->
+ <property key="checkstyle.javadoc.scope" value="nothing" />
+
+ <!-- allow for lines of 100 chars. These long lines will be
+ weeded out by jalopy -->
+ <property key="checkstyle.maxlinelen" value="100"/>
+
+ <property key="checkstyle.allow.protected" value="true" />
+ <property key="checkstyle.maxmethodlen" value="500" />
+ <property key="checkstyle.maxconstructorlen" value="500" />
</checkstyle>
</target>
1.1 jakarta-log4j/src/sun_checks.xml
Index: sun_checks.xml
===================================================================
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.0//EN"
"http://www.puppycrawl.com/dtds/configuration_1_0.dtd">
<!--
a Checkstyle configuration that checks the sun coding conventions from
the Java Language Specification at
http://java.sun.com/docs/books/jls/second_edition/html/index.html
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">
<module name="TreeWalker">
<!-- code conventions -->
<!-- naming conventions -->
<module name="ConstantName"/>
<module name="MethodName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="ParameterName"/>
<module name="TypeName"/>
<module name="StaticVariableName"/>
<module name="PackageName"/>
<!-- code layout -->
<module name="RightCurly"/>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="OperatorWrap"/>
<!-- standard whitespace settings -->
<module name="ParenPad"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround"/>
<!-- JavaDoc guidelines -->
<!--
<module name="JavadocMethod"/>
<module name="JavadocType"/>
<module name="JavadocVariable"/>
-->
<!-- JLS -->
<!-- <module name="RedundantModifier"/> -->
<module name="ModifierOrder"/>
<module name="UpperEll"/>
<!-- Api Doc -->
<!-- override hashCode whenever you override equals() -->
<module name="EqualsHashCode"/>
<!-- don't create new instances of Boolean,
use Boolean.TRUE/FALSE or Boolean.valueOf() instead -->
<module name="IllegalInstantiation">
<property name="classes" value="java.lang.Boolean"/>
</module>
<!-- best practices -->
<!-- don't allow empty blocks (in particular catch blocks) -->
<module name="EmptyBlock"/>
<!-- avoid inner assignments -->
<module name="InnerAssignment"/>
<!-- don't allow imports from the sun.* package hierarchy -->
<module name="IllegalImport"/>
<!-- don't allow public members -->
<module name="VisibilityModifier">
<property name="protectedAllowed" value="true"/>
<property name="packageAllowed" value="true"/>
</module>
<!-- simplify your code -->
<!-- <module name="RedundantImport"/> -->
<module name="UnusedImports"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<!-- flag reminder comments -->
<module name="TodoComment"/>
<!-- enforce default length limits -->
<!--
<module name="LineLength"/>
<module name="MethodLength"/>
<module name="FileLength"/>
-->
<!-- don't allow tabs -->
<module name="TabCharacter"/>
</module>
<!-- enforce package documentation -->
<module name="PackageHtml"/>
</module>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]