1+ <?xml version =" 1.0" ?>
2+ <!DOCTYPE module PUBLIC
3+ "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4+ "http://www.puppycrawl.com/dtds/configuration_1_3.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 a package-info.java file exists for each package. -->
43+ <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
44+ <module name =" JavadocPackage" />
45+
46+ <!-- Checks whether files end with a new line. -->
47+ <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
48+ <module name =" NewlineAtEndOfFile" />
49+
50+ <!-- Checks that property files contain the same keys. -->
51+ <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
52+ <module name =" Translation" />
53+
54+ <!-- Checks for Size Violations. -->
55+ <!-- See http://checkstyle.sf.net/config_sizes.html -->
56+ <module name =" FileLength" />
57+
58+ <!-- Checks for whitespace -->
59+ <!-- See http://checkstyle.sf.net/config_whitespace.html -->
60+ <module name =" FileTabCharacter" />
61+
62+ <!-- Miscellaneous other checks. -->
63+ <!-- See http://checkstyle.sf.net/config_misc.html -->
64+ <module name =" RegexpSingleline" >
65+ <property name =" format" value =" \s+$" />
66+ <property name =" minimum" value =" 0" />
67+ <property name =" maximum" value =" 0" />
68+ <property name =" message" value =" Line has trailing spaces." />
69+ </module >
70+
71+ <!-- Checks for Headers -->
72+ <!-- See http://checkstyle.sf.net/config_header.html -->
73+ <!-- <module name="Header"> -->
74+ <!-- <property name="headerFile" value="${checkstyle.header.file}"/> -->
75+ <!-- <property name="fileExtensions" value="java"/> -->
76+ <!-- </module> -->
77+
78+ <module name =" TreeWalker" >
79+
80+ <!-- Checks for Javadoc comments. -->
81+ <!-- See http://checkstyle.sf.net/config_javadoc.html -->
82+ <module name =" JavadocMethod" />
83+ <module name =" JavadocType" />
84+ <module name =" JavadocVariable" />
85+ <module name =" JavadocStyle" />
86+
87+
88+ <!-- Checks for Naming Conventions. -->
89+ <!-- See http://checkstyle.sf.net/config_naming.html -->
90+ <module name =" ConstantName" />
91+ <module name =" LocalFinalVariableName" />
92+ <module name =" LocalVariableName" />
93+ <module name =" MemberName" />
94+ <module name =" MethodName" />
95+ <module name =" PackageName" />
96+ <module name =" ParameterName" />
97+ <module name =" StaticVariableName" />
98+ <module name =" TypeName" />
99+
100+
101+ <!-- Checks for imports -->
102+ <!-- See http://checkstyle.sf.net/config_import.html -->
103+ <module name =" AvoidStarImport" />
104+ <module name =" IllegalImport" />
105+ <!-- defaults to sun.* packages -->
106+ <module name =" RedundantImport" />
107+ <module name =" UnusedImports" />
108+
109+
110+ <!-- Checks for Size Violations. -->
111+ <!-- See http://checkstyle.sf.net/config_sizes.html -->
112+ <module name =" LineLength" />
113+ <module name =" MethodLength" />
114+ <module name =" ParameterNumber" />
115+
116+
117+ <!-- Checks for whitespace -->
118+ <!-- See http://checkstyle.sf.net/config_whitespace.html -->
119+ <module name =" EmptyForIteratorPad" />
120+ <module name =" GenericWhitespace" />
121+ <module name =" MethodParamPad" />
122+ <module name =" NoWhitespaceAfter" />
123+ <module name =" NoWhitespaceBefore" />
124+ <module name =" OperatorWrap" />
125+ <module name =" ParenPad" />
126+ <module name =" TypecastParenPad" />
127+ <module name =" WhitespaceAfter" />
128+ <module name =" WhitespaceAround" />
129+
130+
131+ <!-- Modifier Checks -->
132+ <!-- See http://checkstyle.sf.net/config_modifiers.html -->
133+ <module name =" ModifierOrder" />
134+ <module name =" RedundantModifier" />
135+
136+
137+ <!-- Checks for blocks. You know, those {}'s -->
138+ <!-- See http://checkstyle.sf.net/config_blocks.html -->
139+ <module name =" AvoidNestedBlocks" />
140+ <module name =" EmptyBlock" />
141+ <module name =" LeftCurly" />
142+ <module name =" NeedBraces" />
143+ <module name =" RightCurly" />
144+
145+
146+ <!-- Checks for common coding problems -->
147+ <!-- See http://checkstyle.sf.net/config_coding.html -->
148+ <module name =" AvoidInlineConditionals" />
149+ <module name =" EmptyStatement" />
150+ <module name =" EqualsHashCode" />
151+ <module name =" HiddenField" />
152+ <module name =" IllegalInstantiation" />
153+ <module name =" InnerAssignment" />
154+ <module name =" MagicNumber" />
155+ <module name =" MissingSwitchDefault" />
156+ <module name =" RedundantThrows" />
157+ <module name =" SimplifyBooleanExpression" />
158+ <module name =" SimplifyBooleanReturn" />
159+
160+ <!-- Checks for class design -->
161+ <!-- See http://checkstyle.sf.net/config_design.html -->
162+ <module name =" DesignForExtension" />
163+ <module name =" FinalClass" />
164+ <module name =" HideUtilityClassConstructor" />
165+ <module name =" InterfaceIsType" />
166+ <module name =" VisibilityModifier" />
167+
168+
169+ <!-- Miscellaneous other checks. -->
170+ <!-- See http://checkstyle.sf.net/config_misc.html -->
171+ <module name =" ArrayTypeStyle" />
172+ <module name =" FinalParameters" />
173+ <module name =" TodoComment" />
174+ <module name =" UpperEll" />
175+
176+ </module >
177+
178+ </module >
0 commit comments