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