1
1
<?xml version =" 1.0" ?>
2
2
<!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">
5
5
6
6
<!--
7
+
7
8
Checkstyle configuration that checks the sun coding conventions from:
9
+
8
10
- the Java Language Specification at
9
11
https://docs.oracle.com/javase/specs/jls/se11/html/index.html
12
+
10
13
- the Sun Code Conventions at https://www.oracle.com/technetwork/java/codeconvtoc-136057.html
14
+
11
15
- the Javadoc guidelines at
12
16
https://www.oracle.com/technetwork/java/javase/documentation/index-137868.html
17
+
13
18
- the JDK Api documentation https://docs.oracle.com/en/java/javase/11/
19
+
14
20
- some best practices
21
+
15
22
Checkstyle is very configurable. Be sure to read the documentation at
16
23
https://checkstyle.org (or in your downloaded distribution).
24
+
17
25
Most Checks are configurable, be sure to consult the documentation.
26
+
18
27
To completely disable a check, just comment it out or delete it from the file.
19
28
To suppress certain violations please review suppression filters.
29
+
20
30
Finally, it is worth reading the documentation.
31
+
21
32
-->
22
33
23
34
<module name =" Checker" >
24
35
<!--
25
36
If you set the basedir property below, then all reported file
26
37
names will be relative to the specified directory. See
27
38
https://checkstyle.org/5.x/config.html#Checker
39
+
28
40
<property name="basedir" value="${basedir}"/>
29
41
-->
30
42
<property name =" severity" value =" error" />
60
72
<!-- See https://checkstyle.org/config_sizes.html -->
61
73
<module name =" FileLength" />
62
74
<module name =" LineLength" >
63
- <property name =" fileExtensions" value =" java" />
64
- <property name =" max" value =" 120" />
75
+ <property name =" fileExtensions" value =" java" />
76
+ <property name =" max" value =" 120" />
65
77
</module >
66
78
67
79
<!-- Checks for whitespace -->
71
83
<!-- Miscellaneous other checks. -->
72
84
<!-- See https://checkstyle.org/config_misc.html -->
73
85
<module name =" RegexpSingleline" >
74
- <property name =" format" value =" \s+$" />
75
- <property name =" minimum" value =" 0" />
76
- <property name =" maximum" value =" 0" />
77
- <property name =" message" value =" Line has trailing spaces." />
86
+ <property name =" format" value =" \s+$" />
87
+ <property name =" minimum" value =" 0" />
88
+ <property name =" maximum" value =" 0" />
89
+ <property name =" message" value =" Line has trailing spaces." />
78
90
</module >
79
91
80
92
<!-- Checks for Headers -->
88
100
89
101
<!-- Checks for Javadoc comments. -->
90
102
<!-- See https://checkstyle.org/config_javadoc.html -->
91
- <!-- < module name="InvalidJavadocPosition"/> -- >
92
- <!-- < module name="JavadocMethod"/> -- >
93
- <!-- < module name="JavadocType"/> -- >
103
+ <module name =" InvalidJavadocPosition" />
104
+ <module name =" JavadocMethod" />
105
+ <module name =" JavadocType" />
94
106
<!-- <module name="JavadocVariable"/> -->
95
- <!-- < module name="JavadocStyle"/> -- >
107
+ <module name =" JavadocStyle" />
96
108
<!-- <module name="MissingJavadocMethod"/> -->
97
109
98
110
<!-- Checks for Naming Conventions. -->
151
163
<!-- See https://checkstyle.org/config_coding.html -->
152
164
<module name =" EmptyStatement" />
153
165
<module name =" EqualsHashCode" />
154
- <!-- < module name="HiddenField"/> -- >
166
+ <module name =" HiddenField" />
155
167
<module name =" IllegalInstantiation" />
156
168
<module name =" InnerAssignment" />
157
- <!-- < module name="MagicNumber"/> -- >
169
+ <module name =" MagicNumber" />
158
170
<module name =" MissingSwitchDefault" />
159
171
<module name =" MultipleVariableDeclarations" />
160
172
<module name =" SimplifyBooleanExpression" />
161
173
<module name =" SimplifyBooleanReturn" />
162
174
163
175
<!-- Checks for class design -->
164
176
<!-- See https://checkstyle.org/config_design.html -->
165
- <!-- < module name="DesignForExtension"/> -- >
177
+ <module name =" DesignForExtension" />
166
178
<module name =" FinalClass" />
167
179
<!-- <module name="HideUtilityClassConstructor"/> -->
168
180
<module name =" InterfaceIsType" />
172
184
<!-- See https://checkstyle.org/config_misc.html -->
173
185
<module name =" ArrayTypeStyle" />
174
186
<!-- <module name="FinalParameters"/> -->
175
- <!-- < module name="TodoComment"/> -- >
187
+ <module name =" TodoComment" />
176
188
<module name =" UpperEll" />
177
189
190
+ <module name =" Indentation" >
191
+ <property name =" basicOffset" value =" 4" />
192
+ </module >
193
+
178
194
<!-- https://checkstyle.org/config_filters.html#SuppressionXpathFilter -->
179
195
<module name =" SuppressionXpathFilter" >
180
196
<property name =" file" value =" ${org.checkstyle.sun.suppressionxpathfilter.config}"
184
200
185
201
</module >
186
202
187
- </module >
203
+ </module >
0 commit comments