@@ -18,90 +18,118 @@ specific language governing permissions and limitations
1818under the License.
1919-->
2020<!DOCTYPE module PUBLIC
21- "-//Puppy Crawl //DTD Check Configuration 1.3//EN"
22- "http ://www.puppycrawl.com /dtds/configuration_1_3.dtd">
21+ "-//Checkstyle //DTD Checkstyle Configuration 1.3//EN"
22+ "https ://checkstyle.org /dtds/configuration_1_3.dtd">
2323
2424<!--
2525 Checkstyle configuration that checks the sun coding conventions from:
2626 - the Java Language Specification at
27- http ://java.sun .com/docs/books /jls/second_edition /html/index.html
28- - the Sun Code Conventions at http ://java.sun .com/docs/codeconv/
27+ https ://docs.oracle .com/javase/specs /jls/se11 /html/index.html
28+ - the Sun Code Conventions at https ://www.oracle .com/java/technologies/javase/codeconventions-contents.html
2929 - the Javadoc guidelines at
30- http ://java.sun .com/j2se/javadoc/writingdoccomments/index .html
31- - the JDK Api documentation http ://java.sun .com/j2se/docs/api/index.html
30+ https ://www.oracle .com/technical-resources/articles/java/javadoc-tool .html
31+ - the JDK Api documentation https ://docs.oracle .com/en/java/javase/11/
3232 - some best practices
3333 Checkstyle is very configurable. Be sure to read the documentation at
34- http ://checkstyle.sf.net (or in your downloaded distribution).
34+ https ://checkstyle.org (or in your downloaded distribution).
3535 Most Checks are configurable, be sure to consult the documentation.
3636 To completely disable a check, just comment it out or delete it from the file.
37+ To suppress certain violations please review suppression filters.
3738 Finally, it is worth reading the documentation.
3839-->
3940
4041<module name =" Checker" >
4142 <!--
4243 If you set the basedir property below, then all reported file
4344 names will be relative to the specified directory. See
44- http ://checkstyle.sourceforge.net/5.x /config.html#Checker
45+ https ://checkstyle.org /config.html#Checker
4546 <property name="basedir" value="${basedir}"/>
4647 -->
4748 <property name =" charset" value =" UTF-8" />
49+ <property name =" severity" value =" error" />
4850
4951 <property name =" fileExtensions" value =" java, properties, xml" />
5052
53+ <!-- Excludes all 'module-info.java' files -->
54+ <!-- See https://checkstyle.org/config_filefilters.html -->
55+ <module name =" BeforeExecutionExclusionFileFilter" >
56+ <property name =" fileNamePattern" value =" module\-info\.java$" />
57+ </module >
58+
59+ <!-- https://checkstyle.org/config_filters.html#SuppressionFilter -->
60+ <module name =" SuppressionFilter" >
61+ <property name =" file" value =" ${org.checkstyle.sun.suppressionfilter.config}"
62+ default =" checkstyle-suppressions.xml" />
63+ <property name =" optional" value =" true" />
64+ </module >
65+
5166 <!-- Checks that a package-info.java file exists for each package. -->
52- <!-- See http ://checkstyle.sf.net /config_javadoc.html#JavadocPackage -->
67+ <!-- See https ://checkstyle.org /config_javadoc.html#JavadocPackage -->
5368 <!-- <module name="JavadocPackage"/>-->
5469
5570 <!-- Checks whether files end with a new line. -->
56- <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
57- <module name =" NewlineAtEndOfFile" >
58- <property name =" lineSeparator" value =" lf" />
59- </module >
71+ <!-- See https://checkstyle.org/config_misc.html#NewlineAtEndOfFile -->
72+ <module name =" NewlineAtEndOfFile" />
73+
6074 <!-- Checks that property files contain the same keys. -->
61- <!-- See http ://checkstyle.sf.net /config_misc.html#Translation -->
75+ <!-- See https ://checkstyle.org /config_misc.html#Translation -->
6276 <module name =" Translation" />
6377
6478 <!-- Checks for Size Violations. -->
65- <!-- See http ://checkstyle.sf.net /config_sizes.html -->
79+ <!-- See https ://checkstyle.org /config_sizes.html -->
6680 <module name =" FileLength" />
81+ <module name =" LineLength" >
82+ <property name =" max" value =" 120" />
83+ <property name =" ignorePattern" value =" ^package.*|^import.*|a href|href|http://|https://|ftp://" />
84+ <property name =" fileExtensions" value =" java" />
85+ </module >
6786
6887 <!-- Checks for whitespace -->
69- <!-- See http ://checkstyle.sf.net /config_whitespace.html -->
88+ <!-- See https ://checkstyle.org /config_whitespace.html -->
7089 <module name =" FileTabCharacter" />
7190
7291 <!-- Miscellaneous other checks. -->
73- <!-- See http ://checkstyle.sf.net /config_misc.html -->
92+ <!-- See https ://checkstyle.org /config_misc.html -->
7493 <module name =" RegexpSingleline" >
75- <property name =" format" value =" (?!\*)\s+$|\*\s\s+$" />
94+ <!-- <property name="format" value="(?!\*)\s+$|\*\s\s+$"/>-->
95+ <property name =" format" value =" \s+$" />
7696 <property name =" minimum" value =" 0" />
7797 <property name =" maximum" value =" 0" />
7898 <property name =" message" value =" Line has trailing spaces." />
7999 </module >
80100
101+ <!-- Checks for Headers -->
102+ <!-- See https://checkstyle.org/config_header.html -->
103+ <module name =" RegexpHeader" >
104+ <property name =" headerFile" value =" ${checkstyle.header.file}" />
105+ <property name =" fileExtensions" value =" java" />
106+ </module >
107+
81108 <module name =" SuppressWarningsFilter" />
82109
83110 <module name =" TreeWalker" >
84111
85112 <!-- Checks for Javadoc comments. -->
86- <!-- See http ://checkstyle.sf.net /config_javadoc.html -->
87- <module name =" AtclauseOrder " />
113+ <!-- See https ://checkstyle.org /config_javadoc.html -->
114+ <module name =" InvalidJavadocPosition " />
88115 <module name =" JavadocMethod" >
89116 <property name =" severity" value =" warning" />
90117 </module >
91118 <module name =" JavadocType" />
92119 <module name =" JavadocVariable" >
93- <property name =" severity" value =" warning " />
120+ <property name =" severity" value =" info " />
94121 </module >
95122 <module name =" JavadocStyle" />
96- <module name =" NonEmptyAtclauseDescription" />
97- <module name =" SingleLineJavadoc" />
98- <module name =" WriteTag" />
99- <module name =" SummaryJavadoc" >
123+ <module name =" MissingJavadocMethod" >
100124 <property name =" severity" value =" warning" />
101125 </module >
102126
127+ <module name =" AtclauseOrder" />
128+ <module name =" NonEmptyAtclauseDescription" />
129+ <module name =" SingleLineJavadoc" />
130+
103131 <!-- Checks for Naming Conventions. -->
104- <!-- See http ://checkstyle.sf.net /config_naming.html -->
132+ <!-- See https ://checkstyle.org /config_naming.html -->
105133 <module name =" ConstantName" />
106134 <module name =" LocalFinalVariableName" />
107135 <module name =" LocalVariableName" />
@@ -113,7 +141,7 @@ under the License.
113141 <module name =" TypeName" />
114142
115143 <!-- Checks for imports -->
116- <!-- See http ://checkstyle.sf.net/config_import .html -->
144+ <!-- See https ://checkstyle.org/config_imports .html -->
117145 <!-- <module name="AvoidStarImport"/>-->
118146 <module name =" IllegalImport" /> <!-- defaults to sun.* packages -->
119147 <module name =" RedundantImport" />
@@ -122,16 +150,12 @@ under the License.
122150 </module >
123151
124152 <!-- Checks for Size Violations. -->
125- <!-- See http://checkstyle.sf.net/config_sizes.html -->
126- <module name =" LineLength" >
127- <property name =" max" value =" 120" />
128- <property name =" ignorePattern" value =" ^package.*|^import.*|a href|href|http://|https://|ftp://" />
129- </module >
153+ <!-- See https://checkstyle.org/config_sizes.html -->
130154 <module name =" MethodLength" />
131155 <!-- <module name="ParameterNumber"/>-->
132156
133157 <!-- Checks for whitespace -->
134- <!-- See http ://checkstyle.sf.net /config_whitespace.html -->
158+ <!-- See https ://checkstyle.org /config_whitespace.html -->
135159 <module name =" EmptyForIteratorPad" />
136160 <module name =" GenericWhitespace" />
137161 <module name =" MethodParamPad" />
@@ -144,21 +168,20 @@ under the License.
144168 <module name =" WhitespaceAround" />
145169
146170 <!-- Modifier Checks -->
147- <!-- See http ://checkstyle.sf.net/config_modifiers .html -->
171+ <!-- See https ://checkstyle.org/config_modifier .html -->
148172 <module name =" ModifierOrder" />
149173 <module name =" RedundantModifier" />
150174
151175 <!-- Checks for blocks. You know, those {}'s -->
152- <!-- See http ://checkstyle.sf.net /config_blocks.html -->
176+ <!-- See https ://checkstyle.org /config_blocks.html -->
153177 <module name =" AvoidNestedBlocks" />
154178 <module name =" EmptyBlock" />
155179 <module name =" LeftCurly" />
156180 <module name =" NeedBraces" />
157181 <module name =" RightCurly" />
158182
159183 <!-- Checks for common coding problems -->
160- <!-- See http://checkstyle.sf.net/config_coding.html -->
161- <!-- <module name="AvoidInlineConditionals"/>-->
184+ <!-- See https://checkstyle.org/config_coding.html -->
162185 <module name =" EmptyStatement" />
163186 <module name =" EqualsHashCode" />
164187 <module name =" HiddenField" >
@@ -169,28 +192,32 @@ under the License.
169192 <module name =" InnerAssignment" />
170193 <!-- <module name="MagicNumber"/>-->
171194 <module name =" MissingSwitchDefault" />
195+ <module name =" MultipleVariableDeclarations" />
172196 <module name =" SimplifyBooleanExpression" />
173197 <module name =" SimplifyBooleanReturn" />
174198
175199 <!-- Checks for class design -->
176- <!-- See http ://checkstyle.sf.net /config_design.html -->
200+ <!-- See https ://checkstyle.org /config_design.html -->
177201 <module name =" DesignForExtension" />
178202 <module name =" FinalClass" />
179203 <module name =" HideUtilityClassConstructor" />
180204 <module name =" InterfaceIsType" />
181205 <module name =" VisibilityModifier" />
182206
183207 <!-- Miscellaneous other checks. -->
184- <!-- See http ://checkstyle.sf.net /config_misc.html -->
208+ <!-- See https ://checkstyle.org /config_misc.html -->
185209 <module name =" ArrayTypeStyle" />
186210 <module name =" FinalParameters" />
187211 <module name =" TodoComment" />
188212 <module name =" UpperEll" />
189213
190- <module name =" SuppressWarningsHolder" />
191- </module >
214+ <!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter -->
215+ <module name =" SuppressionXpathFilter" >
216+ <property name =" file" value =" ${org.checkstyle.sun.suppressionxpathfilter.config}"
217+ default =" checkstyle-xpath-suppressions.xml" />
218+ <property name =" optional" value =" true" />
219+ </module >
192220
193- <module name =" RegexpHeader" >
194- <property name =" headerFile" value =" ${checkstyle.header.file}" />
195221 </module >
222+
196223</module >
0 commit comments