11<?xml version =" 1.0" ?>
22<!DOCTYPE module PUBLIC
3- "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
4- "https://checkstyle.org/dtds/configuration_1_3.dtd">
3+ "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
4+ "https://checkstyle.org/dtds/configuration_1_3.dtd">
55
66<!--
77
88 Checkstyle configuration that checks the sun coding conventions from:
99
1010 - the Java Language Specification at
11- http ://java.sun .com/docs/books /jls/second_edition /html/index.html
11+ https ://docs.oracle .com/javase/specs /jls/se11 /html/index.html
1212
13- - the Sun Code Conventions at http ://java.sun .com/docs/codeconv/
13+ - the Sun Code Conventions at https ://www.oracle .com/java/technologies/javase/codeconventions-contents.html
1414
1515 - the Javadoc guidelines at
16- http ://java.sun .com/j2se/javadoc/writingdoccomments/index .html
16+ https ://www.oracle .com/technical-resources/articles/java/javadoc-tool .html
1717
18- - the JDK Api documentation http ://java.sun .com/j2se/docs/api/index.html
18+ - the JDK Api documentation https ://docs.oracle .com/en/java/javase/11/
1919
2020 - some best practices
2121
2222 Checkstyle is very configurable. Be sure to read the documentation at
23- http ://checkstyle.sf.net (or in your downloaded distribution).
23+ https ://checkstyle.org (or in your downloaded distribution).
2424
2525 Most Checks are configurable, be sure to consult the documentation.
2626
2727 To completely disable a check, just comment it out or delete it from the file.
28+ To suppress certain violations please review suppression filters.
2829
2930 Finally, it is worth reading the documentation.
3031
3132-->
3233
3334<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- https://checkstyle.org/5.x/config.html#Checker
38-
39- <property name="basedir" value="${basedir}"/>
40- -->
41-
42- <property name =" fileExtensions" value =" java, properties, xml" />
43-
44- <!-- Checks that a package-info.java file exists for each package. -->
45- <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
46- <!-- <module name="JavadocPackage"/>-->
47-
48- <!-- Checks whether files end with a new line. -->
49- <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
50- <module name =" NewlineAtEndOfFile" />
51-
52- <!-- Checks that property files contain the same keys. -->
53- <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
54- <module name =" Translation" />
35+ <!--
36+ If you set the basedir property below, then all reported file
37+ names will be relative to the specified directory. See
38+ https://checkstyle.org/config.html#Checker
39+
40+ <property name="basedir" value="${basedir}"/>
41+ -->
42+ <property name =" severity" value =" error" />
43+
44+ <property name =" fileExtensions" value =" java, properties, xml" />
45+
46+ <!-- Excludes all 'module-info.java' files -->
47+ <!-- See https://checkstyle.org/config_filefilters.html -->
48+ <module name =" BeforeExecutionExclusionFileFilter" >
49+ <property name =" fileNamePattern" value =" module\-info\.java$" />
50+ </module >
51+
52+ <!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
53+ <module name =" SuppressionFilter" >
54+ <property name =" file" value =" ${org.checkstyle.sun.suppressionfilter.config}"
55+ default =" checkstyle-suppressions.xml" />
56+ <property name =" optional" value =" true" />
57+ </module >
58+
59+ <!-- Checks that a package-info.java file exists for each package. -->
60+ <!-- See https://checkstyle.org/config_javadoc.html#JavadocPackage -->
61+ <module name =" JavadocPackage" />
62+
63+ <!-- Checks whether files end with a new line. -->
64+ <!-- See https://checkstyle.org/config_misc.html#NewlineAtEndOfFile -->
65+ <module name =" NewlineAtEndOfFile" />
66+
67+ <!-- Checks that property files contain the same keys. -->
68+ <!-- See https://checkstyle.org/config_misc.html#Translation -->
69+ <module name =" Translation" />
70+
71+ <!-- Checks for Size Violations. -->
72+ <!-- See https://checkstyle.org/config_sizes.html -->
73+ <module name =" FileLength" />
74+ <module name =" LineLength" >
75+ <property name =" fileExtensions" value =" java" />
76+ </module >
77+
78+ <!-- Checks for whitespace -->
79+ <!-- See https://checkstyle.org/config_whitespace.html -->
80+ <module name =" FileTabCharacter" />
81+
82+ <!-- Miscellaneous other checks. -->
83+ <!-- See https://checkstyle.org/config_misc.html -->
84+ <module name =" RegexpSingleline" >
85+ <property name =" format" value =" \s+$" />
86+ <property name =" minimum" value =" 0" />
87+ <property name =" maximum" value =" 0" />
88+ <property name =" message" value =" Line has trailing spaces." />
89+ </module >
90+
91+ <!-- Checks for Headers -->
92+ <!-- See https://checkstyle.org/config_header.html -->
93+ <!-- <module name="Header"> -->
94+ <!-- <property name="headerFile" value="${checkstyle.header.file}"/> -->
95+ <!-- <property name="fileExtensions" value="java"/> -->
96+ <!-- </module> -->
97+
98+ <module name =" TreeWalker" >
99+
100+ <!-- Checks for Javadoc comments. -->
101+ <!-- See https://checkstyle.org/config_javadoc.html -->
102+ <module name =" InvalidJavadocPosition" />
103+ <module name =" JavadocMethod" />
104+ <module name =" JavadocType" />
105+ <module name =" JavadocVariable" />
106+ <module name =" JavadocStyle" />
107+ <module name =" MissingJavadocMethod" />
108+
109+ <!-- Checks for Naming Conventions. -->
110+ <!-- See https://checkstyle.org/config_naming.html -->
111+ <module name =" ConstantName" />
112+ <module name =" LocalFinalVariableName" />
113+ <module name =" LocalVariableName" />
114+ <module name =" MemberName" />
115+ <module name =" MethodName" />
116+ <module name =" PackageName" />
117+ <module name =" ParameterName" />
118+ <module name =" StaticVariableName" />
119+ <module name =" TypeName" />
120+
121+ <!-- Checks for imports -->
122+ <!-- See https://checkstyle.org/config_imports.html -->
123+ <module name =" AvoidStarImport" />
124+ <module name =" IllegalImport" /> <!-- defaults to sun.* packages -->
125+ <module name =" RedundantImport" />
126+ <module name =" UnusedImports" >
127+ <property name =" processJavadoc" value =" false" />
128+ </module >
55129
56130 <!-- Checks for Size Violations. -->
57- <!-- See http://checkstyle.sf.net/config_sizes.html -->
58- <module name =" FileLength" />
131+ <!-- See https://checkstyle.org/config_sizes.html -->
132+ <module name =" MethodLength" />
133+ <module name =" ParameterNumber" />
59134
60135 <!-- Checks for whitespace -->
61- <!-- See http://checkstyle.sf.net/config_whitespace.html -->
62- <module name =" FileTabCharacter" />
136+ <!-- See https://checkstyle.org/config_whitespace.html -->
137+ <module name =" EmptyForIteratorPad" />
138+ <module name =" GenericWhitespace" />
139+ <module name =" MethodParamPad" />
140+ <module name =" NoWhitespaceAfter" />
141+ <module name =" NoWhitespaceBefore" />
142+ <module name =" OperatorWrap" />
143+ <module name =" ParenPad" />
144+ <module name =" TypecastParenPad" />
145+ <module name =" WhitespaceAfter" />
146+ <module name =" WhitespaceAround" />
147+
148+ <!-- Modifier Checks -->
149+ <!-- See https://checkstyle.org/config_modifier.html -->
150+ <module name =" ModifierOrder" />
151+ <module name =" RedundantModifier" />
152+
153+ <!-- Checks for blocks. You know, those {}'s -->
154+ <!-- See https://checkstyle.org/config_blocks.html -->
155+ <module name =" AvoidNestedBlocks" />
156+ <module name =" EmptyBlock" />
157+ <module name =" LeftCurly" />
158+ <module name =" NeedBraces" />
159+ <module name =" RightCurly" />
160+
161+ <!-- Checks for common coding problems -->
162+ <!-- See https://checkstyle.org/config_coding.html -->
163+ <module name =" EmptyStatement" />
164+ <module name =" EqualsHashCode" />
165+ <module name =" HiddenField" />
166+ <module name =" IllegalInstantiation" />
167+ <module name =" InnerAssignment" />
168+ <module name =" MagicNumber" />
169+ <module name =" MissingSwitchDefault" />
170+ <module name =" MultipleVariableDeclarations" />
171+ <module name =" SimplifyBooleanExpression" />
172+ <module name =" SimplifyBooleanReturn" />
173+
174+ <!-- Checks for class design -->
175+ <!-- See https://checkstyle.org/config_design.html -->
176+ <module name =" DesignForExtension" />
177+ <module name =" FinalClass" />
178+ <module name =" HideUtilityClassConstructor" />
179+ <module name =" InterfaceIsType" />
180+ <module name =" VisibilityModifier" />
63181
64182 <!-- Miscellaneous other checks. -->
65- <!-- See http://checkstyle.sf.net/config_misc.html -->
66- <module name =" RegexpSingleline" >
67- <property name =" format" value =" \s+$" />
68- <property name =" minimum" value =" 0" />
69- <property name =" maximum" value =" 0" />
70- <property name =" message" value =" Line has trailing spaces." />
183+ <!-- See https://checkstyle.org/config_misc.html -->
184+ <module name =" ArrayTypeStyle" />
185+ <module name =" FinalParameters" />
186+ <module name =" TodoComment" />
187+ <module name =" UpperEll" />
188+
189+ <!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter -->
190+ <module name =" SuppressionXpathFilter" >
191+ <property name =" file" value =" ${org.checkstyle.sun.suppressionxpathfilter.config}"
192+ default =" checkstyle-xpath-suppressions.xml" />
193+ <property name =" optional" value =" true" />
71194 </module >
72195
73- <!-- Checks for Headers -->
74- <!-- See http://checkstyle.sf.net/config_header.html -->
75- <!-- <module name="Header"> -->
76- <!-- <property name="headerFile" value="${checkstyle.header.file}"/> -->
77- <!-- <property name="fileExtensions" value="java"/> -->
78- <!-- </module> -->
79-
80- <module name =" TreeWalker" >
81-
82- <!-- Checks for Javadoc comments. -->
83- <!-- See http://checkstyle.sf.net/config_javadoc.html -->
84- <module name =" JavadocMethod" />
85- <module name =" JavadocType" />
86- <module name =" JavadocVariable" />
87- <module name =" JavadocStyle" />
88-
89- <!-- Checks for Naming Conventions. -->
90- <!-- See http://checkstyle.sf.net/config_naming.html -->
91- <module name =" ConstantName" />
92- <module name =" LocalFinalVariableName" />
93- <module name =" LocalVariableName" />
94- <module name =" MemberName" />
95- <module name =" MethodName" />
96- <module name =" PackageName" />
97- <module name =" ParameterName" />
98- <module name =" StaticVariableName" />
99- <module name =" TypeName" />
100-
101- <!-- Checks for imports -->
102- <!-- See http://checkstyle.sf.net/config_import.html -->
103- <module name =" AvoidStarImport" />
104- <module name =" IllegalImport" /> <!-- defaults to sun.* packages -->
105- <module name =" RedundantImport" />
106- <module name =" UnusedImports" >
107- <property name =" processJavadoc" value =" false" />
108- </module >
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- <!-- Checks for whitespace -->
117- <!-- See http://checkstyle.sf.net/config_whitespace.html -->
118- <module name =" EmptyForIteratorPad" />
119- <module name =" GenericWhitespace" />
120- <module name =" MethodParamPad" />
121- <module name =" NoWhitespaceAfter" />
122- <module name =" NoWhitespaceBefore" />
123- <module name =" OperatorWrap" />
124- <module name =" ParenPad" />
125- <module name =" TypecastParenPad" />
126- <module name =" WhitespaceAfter" />
127- <module name =" WhitespaceAround" />
128-
129- <!-- Modifier Checks -->
130- <!-- See http://checkstyle.sf.net/config_modifiers.html -->
131- <module name =" ModifierOrder" />
132- <module name =" RedundantModifier" />
133-
134- <!-- Checks for blocks. You know, those {}'s -->
135- <!-- See http://checkstyle.sf.net/config_blocks.html -->
136- <module name =" AvoidNestedBlocks" />
137- <module name =" EmptyBlock" />
138- <module name =" LeftCurly" />
139- <module name =" NeedBraces" />
140- <module name =" RightCurly" />
141-
142- <!-- Checks for common coding problems -->
143- <!-- See http://checkstyle.sf.net/config_coding.html -->
144- <module name =" AvoidInlineConditionals" />
145- <module name =" EmptyStatement" />
146- <module name =" EqualsHashCode" />
147- <module name =" HiddenField" />
148- <module name =" IllegalInstantiation" />
149- <module name =" InnerAssignment" />
150- <module name =" MagicNumber" />
151- <module name =" MissingSwitchDefault" />
152- <module name =" SimplifyBooleanExpression" />
153- <module name =" SimplifyBooleanReturn" />
154-
155- <!-- Checks for class design -->
156- <!-- See http://checkstyle.sf.net/config_design.html -->
157- <module name =" DesignForExtension" />
158- <module name =" FinalClass" />
159- <module name =" HideUtilityClassConstructor" />
160- <module name =" InterfaceIsType" />
161- <module name =" VisibilityModifier" />
162-
163- <!-- Miscellaneous other checks. -->
164- <!-- See http://checkstyle.sf.net/config_misc.html -->
165- <module name =" ArrayTypeStyle" />
166- <module name =" FinalParameters" />
167- <module name =" TodoComment" />
168- <module name =" UpperEll" />
169-
170- </module >
196+ </module >
171197
172- </module >
198+ </module >
0 commit comments