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
+ https://docs.oracle.com/javase/specs/jls/se11/html/index.html
12
+
13
+ - the Sun Code Conventions at https://www.oracle.com/java/technologies/javase/codeconventions-contents.html
14
+
15
+ - the Javadoc guidelines at
16
+ https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html
17
+
18
+ - the JDK Api documentation https://docs.oracle.com/en/java/javase/11/
19
+
20
+ - some best practices
21
+
22
+ Checkstyle is very configurable. Be sure to read the documentation at
23
+ https://checkstyle.org (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
+ To suppress certain violations please review suppression filters.
29
+
30
+ Finally, it is worth reading the documentation.
31
+
32
+ -->
33
+
34
+ <module name =" Checker" >
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}" default =" checkstyle-suppressions.xml" />
55
+ <property name =" optional" value =" true" />
56
+ </module >
57
+
58
+ <!-- Checks that a package-info.java file exists for each package. -->
59
+ <!-- See https://checkstyle.org/config_javadoc.html#JavadocPackage -->
60
+ <!-- <module name="JavadocPackage"/> -->
61
+
62
+ <!-- Checks whether files end with a new line. -->
63
+ <!-- See https://checkstyle.org/config_misc.html#NewlineAtEndOfFile -->
64
+ <module name =" NewlineAtEndOfFile" />
65
+
66
+ <!-- Checks that property files contain the same keys. -->
67
+ <!-- See https://checkstyle.org/config_misc.html#Translation -->
68
+ <module name =" Translation" />
69
+
70
+ <!-- Checks for whitespace -->
71
+ <!-- See https://checkstyle.org/config_whitespace.html -->
72
+ <module name =" FileTabCharacter" />
73
+
74
+ <!-- Miscellaneous other checks. -->
75
+ <!-- See https://checkstyle.org/config_misc.html -->
76
+ <module name =" RegexpSingleline" >
77
+ <property name =" format" value =" \s+$" />
78
+ <property name =" minimum" value =" 0" />
79
+ <property name =" maximum" value =" 0" />
80
+ <property name =" message" value =" Line has trailing spaces." />
81
+ </module >
82
+
83
+ <!-- Enables @SuppressWarnings Support -->
84
+ <module name =" SuppressWarningsFilter" />
85
+ <module name =" TreeWalker" >
86
+
87
+ <!-- Checks for Javadoc comments. -->
88
+ <!-- See https://checkstyle.org/config_javadoc.html -->
89
+ <module name =" InvalidJavadocPosition" />
90
+ <module name =" JavadocMethod" />
91
+ <module name =" JavadocType" />
92
+ <module name =" JavadocVariable" />
93
+ <module name =" MissingJavadocMethod" />
94
+ <!-- Enables @SuppressWarnings Support -->
95
+ <module name =" SuppressWarningsHolder" />
96
+
97
+ <!-- Checks for Naming Conventions. -->
98
+ <!-- See https://checkstyle.org/config_naming.html -->
99
+ <module name =" ConstantName" />
100
+ <module name =" LocalFinalVariableName" />
101
+ <module name =" LocalVariableName" />
102
+ <module name =" MemberName" />
103
+ <module name =" MethodName" />
104
+ <module name =" PackageName" />
105
+ <module name =" ParameterName" />
106
+ <module name =" StaticVariableName" />
107
+ <module name =" TypeName" />
108
+
109
+ <!-- Checks for imports -->
110
+ <!-- See https://checkstyle.org/config_imports.html -->
111
+ <module name =" AvoidStarImport" />
112
+ <module name =" IllegalImport" />
113
+ <!-- defaults to sun.* packages -->
114
+ <module name =" RedundantImport" />
115
+ <module name =" UnusedImports" >
116
+ <property name =" processJavadoc" value =" false" />
117
+ </module >
118
+
119
+ <!-- Checks for Size Violations. -->
120
+ <!-- See https://checkstyle.org/config_sizes.html -->
121
+ <module name =" MethodLength" />
122
+ <module name =" ParameterNumber" />
123
+
124
+ <!-- Checks for whitespace -->
125
+ <!-- See https://checkstyle.org/config_whitespace.html -->
126
+ <module name =" EmptyForIteratorPad" />
127
+ <module name =" GenericWhitespace" />
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
+ <!-- Modifier Checks -->
138
+ <!-- See https://checkstyle.org/config_modifiers.html -->
139
+ <module name =" ModifierOrder" />
140
+ <module name =" RedundantModifier" />
141
+
142
+ <!-- Checks for blocks. You know, those {}'s -->
143
+ <!-- See https://checkstyle.org/config_blocks.html -->
144
+ <module name =" AvoidNestedBlocks" />
145
+ <module name =" EmptyBlock" />
146
+ <module name =" LeftCurly" />
147
+ <module name =" NeedBraces" />
148
+ <module name =" RightCurly" />
149
+
150
+ <!-- Checks for common coding problems -->
151
+ <!-- See https://checkstyle.org/config_coding.html -->
152
+ <module name =" EmptyStatement" />
153
+ <module name =" EqualsHashCode" />
154
+ <module name =" IllegalInstantiation" />
155
+ <module name =" InnerAssignment" />
156
+ <module name =" MagicNumber" />
157
+ <module name =" MissingSwitchDefault" />
158
+ <module name =" MultipleVariableDeclarations" />
159
+ <module name =" SimplifyBooleanExpression" />
160
+ <module name =" SimplifyBooleanReturn" />
161
+
162
+ <!-- Checks for class design -->
163
+ <!-- See https://checkstyle.org/config_design.html -->
164
+ <module name =" DesignForExtension" />
165
+ <module name =" FinalClass" />
166
+ <module name =" HideUtilityClassConstructor" />
167
+ <module name =" InterfaceIsType" />
168
+ <module name =" VisibilityModifier" />
169
+
170
+ <!-- Miscellaneous other checks. -->
171
+ <!-- See https://checkstyle.org/config_misc.html -->
172
+ <module name =" ArrayTypeStyle" />
173
+ <module name =" TodoComment" />
174
+ <module name =" UpperEll" />
175
+
176
+ <!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter -->
177
+ <module name =" SuppressionXpathFilter" >
178
+ <property name =" file" value =" ${org.checkstyle.sun.suppressionxpathfilter.config}" default =" checkstyle-xpath-suppressions.xml" />
179
+ <property name =" optional" value =" true" />
180
+ </module >
181
+
182
+ </module >
183
+
184
+ </module >
0 commit comments