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