1 <?xml version="1.0"?>
\r
2 <!DOCTYPE module PUBLIC
\r
3 "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
\r
4 "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
\r
8 Checkstyle configuration that checks the sun coding conventions from:
\r
10 - the Java Language Specification at
\r
11 http://java.sun.com/docs/books/jls/second_edition/html/index.html
\r
13 - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
\r
15 - the Javadoc guidelines at
\r
16 http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
\r
18 - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
\r
20 - some best practices
\r
22 Checkstyle is very configurable. Be sure to read the documentation at
\r
23 http://checkstyle.sf.net (or in your downloaded distribution).
\r
25 Most Checks are configurable, be sure to consult the documentation.
\r
27 To completely disable a check, just comment it out or delete it from the file.
\r
29 Finally, it is worth reading the documentation.
\r
33 <module name="Checker">
\r
35 <!-- Checks that a package.html file exists for each package. -->
\r
36 <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
\r
37 <!-- temporally disable since pakage-info.java is not supported
\r
38 <module name="PackageHtml"/>
\r
41 <!-- Checks that property files contain the same keys. -->
\r
42 <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
\r
43 <!-- <module name="Translation"/> -->
\r
46 <module name="TreeWalker">
\r
48 <!-- Checks for Javadoc comments. -->
\r
49 <!-- See http://checkstyle.sf.net/config_javadoc.html -->
\r
50 <module name="JavadocType">
\r
51 <property name="scope" value="public"/>
\r
53 <module name="JavadocMethod">
\r
54 <property name="scope" value="public"/>
\r
55 <property name="allowUndeclaredRTE" value="true"/>
\r
56 <property name="allowMissingParamTags" value="true"/>
\r
57 <property name="allowMissingThrowsTags" value="true"/>
\r
58 <property name="allowMissingReturnTag" value="true"/>
\r
60 <module name="JavadocVariable">
\r
61 <property name="scope" value="public"/>
\r
63 <module name="JavadocStyle"/>
\r
66 <!-- Checks for Naming Conventions. -->
\r
67 <!-- See http://checkstyle.sf.net/config_naming.html -->
\r
68 <!-- <module name="ConstantName"/>
\r
69 <module name="LocalFinalVariableName"/>
\r
70 <module name="LocalVariableName"/>
\r
71 <module name="MemberName"/>
\r
72 <module name="MethodName"/>
\r
73 <module name="PackageName"/>
\r
74 <module name="ParameterName"/>
\r
75 <module name="StaticVariableName"/>
\r
76 <module name="TypeName"/> -->
\r
79 <!-- Checks for Headers -->
\r
80 <!-- See http://checkstyle.sf.net/config_header.html -->
\r
81 <!-- <module name="Header"> -->
\r
82 <!-- The follow property value demonstrates the ability -->
\r
83 <!-- to have access to ANT properties. In this case it uses -->
\r
84 <!-- the ${basedir} property to allow Checkstyle to be run -->
\r
85 <!-- from any directory within a project. See property -->
\r
87 <!-- http://checkstyle.sf.net/config.html#properties -->
\r
89 <!-- name="headerFile" -->
\r
90 <!-- value="${basedir}/java.header"/> -->
\r
93 <!-- Following interprets the header file as regular expressions. -->
\r
94 <!-- <module name="RegexpHeader"/> -->
\r
97 <!-- Checks for imports -->
\r
98 <!-- See http://checkstyle.sf.net/config_import.html -->
\r
99 <!-- <module name="IllegalImport"/> --><!-- defaults to sun.* packages -->
\r
101 <!-- Checks for Size Violations. -->
\r
102 <!-- See http://checkstyle.sf.net/config_sizes.html -->
\r
103 <!-- <module name="FileLength"/>
\r
104 <module name="MethodLength"/>
\r
105 <module name="ParameterNumber"/> -->
\r
107 <!-- Checks for whitespace -->
\r
108 <!-- See http://checkstyle.sf.net/config_whitespace.html -->
\r
109 <!--<module name="OperatorWrap">
\r
110 <property name="option" value="eol"/>
\r
112 <!-- Modifier Checks -->
\r
113 <!-- See http://checkstyle.sf.net/config_modifiers.html -->
\r
114 <!-- <module name="RedundantModifier"/> -->
\r
116 <!-- Checks for blocks. You know, those {}'s -->
\r
117 <!-- See http://checkstyle.sf.net/config_blocks.html -->
\r
118 <!--module name="NeedBraces"/-->
\r
120 <!-- Checks for common coding problems -->
\r
121 <!-- See http://checkstyle.sf.net/config_coding.html -->
\r
122 <!-- <module name="AvoidInlineConditionals"/>
\r
123 <module name="DoubleCheckedLocking"/>
\r
124 <module name="EmptyStatement"/>
\r
125 <module name="EqualsHashCode"/>
\r
126 <module name="HiddenField"/>
\r
127 <module name="IllegalInstantiation"/>
\r
128 <module name="InnerAssignment"/>
\r
129 <module name="MagicNumber"/>
\r
130 <module name="MissingSwitchDefault"/>
\r
131 <module name="RedundantThrows"/>
\r
132 <module name="SimplifyBooleanExpression"/>
\r
133 <module name="SimplifyBooleanReturn"/> -->
\r
135 <!-- Checks for class design -->
\r
136 <!-- See http://checkstyle.sf.net/config_design.html -->
\r
137 <!-- <module name="DesignForExtension"/>
\r
138 <module name="FinalClass"/>
\r
139 <module name="HideUtilityClassConstructor"/>
\r
140 <module name="InterfaceIsType"/>
\r
141 <module name="VisibilityModifier"/> -->
\r
144 <!-- Miscellaneous other checks. -->
\r
145 <!-- See http://checkstyle.sf.net/config_misc.html -->
\r
146 <!-- <module name="ArrayTypeStyle"/>
\r
147 <module name="FinalParameters"/>
\r
148 <module name="GenericIllegalRegexp">
\r
149 <property name="format" value="\s+$"/>
\r
150 <property name="message" value="Line has trailing spaces."/>
\r
152 <module name="TodoComment"/>
\r
153 <module name="UpperEll"/> -->
\r