1+ <?xml version =" 1.0" ?>
2+ <!DOCTYPE module PUBLIC
3+ "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
4+ "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
5+
6+ <!--
7+
8+ Checkstyle configuration that checks the sun coding conventions from:
9+
10+ - the Java Language Specification at
11+ http://java.sun.com/docs/books/jls/second_edition/html/index.html
12+
13+ - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
14+
15+ - the Javadoc guidelines at
16+ http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
17+
18+ - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
19+
20+ - some best practices
21+
22+ Checkstyle is very configurable. Be sure to read the documentation at
23+ http://checkstyle.sf.net (or in your downloaded distribution).
24+
25+ Most Checks are configurable, be sure to consult the documentation.
26+
27+ To completely disable a check, just comment it out or delete it from the file.
28+
29+ Finally, it is worth reading the documentation.
30+
31+ -->
32+
33+ <module name =" Checker" >
34+ <!--
35+ If you set the basedir property below, then all reported file
36+ names will be relative to the specified directory. See
37+ http://checkstyle.sourceforge.net/5.x/config.html#Checker
38+
39+ <property name="basedir" value="${basedir}"/>
40+ -->
41+
42+ <!-- Checks that each Java package has a Javadoc file used for commenting. -->
43+ <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage
44+ <module name="JavadocPackage">
45+ <property name="allowLegacy" value="true"/>
46+ </module>
47+ -->
48+
49+ <!-- Checks whether files end with a new line. -->
50+ <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
51+ <module name =" NewlineAtEndOfFile" >
52+ <property name =" lineSeparator" value =" lf" />
53+ </module >
54+
55+ <!-- Checks that property files contain the same keys. -->
56+ <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
57+ <module name =" Translation" />
58+
59+ <module name =" FileLength" />
60+
61+ <!-- Following interprets the header file as regular expressions. -->
62+ <!-- <module name="RegexpHeader"/> -->
63+
64+ <module name =" FileTabCharacter" >
65+ <property name =" eachLine" value =" true" />
66+ </module >
67+
68+ <module name =" RegexpSingleline" >
69+ <!-- \s matches whitespace character, $ matches end of line. -->
70+ <property name =" format" value =" \s+$" />
71+ <property name =" message" value =" Line has trailing spaces." />
72+ </module >
73+
74+ <module name =" TreeWalker" >
75+
76+ <property name =" cacheFile" value =" ${checkstyle.cache.file}" />
77+
78+ <!-- Checks for Javadoc comments. -->
79+ <!-- See http://checkstyle.sf.net/config_javadoc.html -->
80+ <module name =" JavadocMethod" />
81+ <module name =" JavadocType" />
82+ <module name =" JavadocVariable" />
83+ <module name =" JavadocStyle" />
84+
85+
86+ <!-- Checks for Naming Conventions. -->
87+ <!-- See http://checkstyle.sf.net/config_naming.html -->
88+ <module name =" LocalFinalVariableName" />
89+ <module name =" LocalVariableName" />
90+ <module name =" MemberName" />
91+ <module name =" MethodName" />
92+ <module name =" PackageName" />
93+ <module name =" ParameterName" />
94+ <!-- <module name="StaticVariableName"/> -->
95+ <module name =" TypeName" />
96+
97+
98+ <!-- Checks for Headers -->
99+ <!-- See http://checkstyle.sf.net/config_header.html -->
100+ <!-- <module name="Header"> -->
101+ <!-- The follow property value demonstrates the ability -->
102+ <!-- to have access to ANT properties. In this case it uses -->
103+ <!-- the ${basedir} property to allow Checkstyle to be run -->
104+ <!-- from any directory within a project. See property -->
105+ <!-- expansion, -->
106+ <!-- http://checkstyle.sf.net/config.html#properties -->
107+ <!-- <property -->
108+ <!-- name="headerFile" -->
109+ <!-- value="${basedir}/java.header"/> -->
110+ <!-- </module> -->
111+
112+
113+ <!-- Checks for imports -->
114+ <!-- See http://checkstyle.sf.net/config_import.html -->
115+ <module name =" AvoidStarImport" />
116+ <module name =" IllegalImport" /> <!-- defaults to sun.* packages -->
117+ <module name =" RedundantImport" />
118+ <module name =" UnusedImports" >
119+ <property name =" processJavadoc" value =" true" />
120+ </module >
121+
122+
123+ <!-- Checks for Size Violations. -->
124+ <!-- See http://checkstyle.sf.net/config_sizes.html -->
125+ <module name =" LineLength" >
126+ <property name =" ignorePattern" value =" ^(import).*$" />
127+ <property name =" max" value =" 100" />
128+ </module >
129+ <module name =" MethodLength" />
130+ <module name =" ParameterNumber" >
131+ <property name =" max" value =" 8" />
132+ </module >
133+
134+
135+ <!-- Checks for whitespace -->
136+ <!-- See http://checkstyle.sf.net/config_whitespace.html -->
137+ <module name =" EmptyForIteratorPad" />
138+ <module name =" MethodParamPad" />
139+ <module name =" NoWhitespaceAfter" />
140+ <module name =" NoWhitespaceBefore" />
141+ <module name =" OperatorWrap" />
142+ <module name =" ParenPad" />
143+ <module name =" TypecastParenPad" />
144+ <module name =" WhitespaceAfter" />
145+ <module name =" WhitespaceAround" />
146+
147+
148+ <!-- Modifier Checks -->
149+ <!-- See http://checkstyle.sf.net/config_modifiers.html -->
150+ <module name =" ModifierOrder" />
151+ <module name =" RedundantModifier" />
152+
153+
154+ <!-- Checks for blocks. You know, those {}'s -->
155+ <!-- See http://checkstyle.sf.net/config_blocks.html -->
156+ <module name =" AvoidNestedBlocks" />
157+ <module name =" EmptyBlock" />
158+ <module name =" LeftCurly" />
159+ <module name =" NeedBraces" />
160+ <module name =" RightCurly" />
161+
162+
163+ <!-- Checks for common coding problems -->
164+ <!-- See http://checkstyle.sf.net/config_coding.html -->
165+ <!-- <module name="AvoidInlineConditionals"/> -->
166+ <module name =" EmptyStatement" />
167+ <module name =" EqualsHashCode" />
168+ <!-- <module name="HiddenField"/> -->
169+ <module name =" IllegalInstantiation" />
170+ <module name =" InnerAssignment" />
171+ <!-- <module name="MagicNumber"/> -->
172+ <module name =" MissingSwitchDefault" />
173+ <module name =" RedundantThrows" />
174+ <module name =" SimplifyBooleanExpression" />
175+ <module name =" SimplifyBooleanReturn" />
176+
177+ <!-- Checks for class design -->
178+ <!-- See http://checkstyle.sf.net/config_design.html -->
179+ <!-- <module name="DesignForExtension"/> -->
180+ <module name =" FinalClass" />
181+ <module name =" HideUtilityClassConstructor" />
182+ <module name =" InterfaceIsType" />
183+ <module name =" VisibilityModifier" >
184+ <property name =" packageAllowed" value =" true" />
185+ <property name =" protectedAllowed" value =" true" />
186+ <property name =" publicMemberPattern" value =" handlebars|fn|inverse|params|tagType|hash|context|line|column|evidence|reason|message|filename|helperName" />
187+ </module >
188+
189+
190+ <!-- Miscellaneous other checks. -->
191+ <!-- See http://checkstyle.sf.net/config_misc.html -->
192+ <module name =" ArrayTypeStyle" />
193+ <module name =" FinalParameters" />
194+ <module name =" TodoComment" >
195+ <property name =" format" value =" WARNING" />
196+ </module >
197+ <module name =" UpperEll" />
198+
199+ </module >
200+
201+ </module >
0 commit comments