-
Notifications
You must be signed in to change notification settings - Fork 96
/
checkstyle-style.xml
327 lines (273 loc) · 14.3 KB
/
checkstyle-style.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!-- This configuration file was written by the eclipse-cs plugin configuration
editor -->
<!-- Checkstyle-Configuration: Bard Project Description: none -->
<module name="Checker">
<property name="severity" value="warning" />
<module name="SuppressWithPlainTextCommentFilter">
<property name="offCommentFormat" value=" // CHECKSTYLE:OFF"/>
<property name="onCommentFormat" value=" // CHECKSTYLE:ON"/>
</module>
<module name="LineLength">
<property name="severity" value="error" />
<property name="ignorePattern" value="^import.*$" />
<property name="max" value="120" />
<property name="tabWidth" value="4" />
<property name="fileExtensions" value="java" />
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity"
value="inherit" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Line length of 120 characters except for import lines." />
</module>
<module name="TreeWalker">
<module name="RedundantModifier">
<property name="severity" value="error" />
</module>
<!-- Make the @SuppressWarnings annotations available to Checkstyle -->
<module name="SuppressWarningsHolder" />
<module name="ConstantName">
<property name="severity" value="error" />
<property name="format" value="^[A-Z][A-Z0-9_]*$" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Constants (static finals) must be uppercase letters/digits/underscore." />
</module>
<module name="RedundantImport">
<property name="severity" value="error" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Duplicate import checking." />
</module>
<module name="UnusedImports">
<property name="severity" value="error" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Unused imports checking." />
</module>
<module name="MethodName">
<property name="severity" value="error" />
<property name="format" value="^[a-z][a-zA-Z0-9]*$" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Method name check." />
</module>
<module name="LocalVariableName">
<property name="severity" value="error" />
<property name="format" value="^[a-z][a-zA-Z0-9]*$" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Local variable name check." />
</module>
<module name="LocalFinalVariableName">
<property name="severity" value="error" />
<property name="format" value="^[a-z][a-zA-Z0-9]*$" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Local final variable name check." />
</module>
<module name="MemberName">
<property name="severity" value="error" />
<property name="format" value="^[a-z][a-zA-Z0-9]*$" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Member name check." />
</module>
<module name="TypeName">
<property name="severity" value="error" />
<property name="format" value="^[A-Z][a-zA-Z0-9]*$" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Class name check." />
</module>
<module name="LeftCurly">
<property name="tokens" value="INTERFACE_DEF,CLASS_DEF,ANNOTATION_DEF,ENUM_DEF,CTOR_DEF,METHOD_DEF,ENUM_CONSTANT_DEF,LITERAL_WHILE,LITERAL_TRY,LITERAL_CATCH,LITERAL_FINALLY,LITERAL_SYNCHRONIZED,LITERAL_SWITCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FOR"/>
<property name="severity" value="error" />
<metadata name="net.sf.eclipsecs.core.comment" value="Left curly goes on end of line (eol)." />
</module>
<module name="RightCurly">
<property name="severity" value="error" />
<property name="option" value="same" />
<property name="tokens" value="LITERAL_TRY,LITERAL_CATCH,LITERAL_FINALLY,LITERAL_ELSE"/>
<metadata name="net.sf.eclipsecs.core.comment"
value="Right curly goes same line as 'else', 'try', and 'catch'." />
</module>
<module name="NeedBraces">
<property name="severity" value="error" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Need braces for all code blocks." />
</module>
<module name="PackageDeclaration">
<property name="severity" value="error"/>
<property name="matchDirectoryStructure" value="true"/>
</module>
<module name="WhitespaceAround">
<property name="severity" value="error" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Checks that a token is surrounded by whitespace." />
</module>
<module name="WhitespaceAfter">
<property name="severity" value="error" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Checks that a token is followed by whitespace." />
</module>
<module name="ParenPad">
<property name="severity" value="error" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Checks the policy on the padding of parentheses." />
</module>
<module name="GenericWhitespace">
<property name="severity" value="error" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Fails if there is whitespace around generic '<' '>' characters." />
</module>
<module name="CyclomaticComplexity">
<property name="severity" value="warning" />
<property name="max" value="7" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Cyclomatic complexity limit of 7." />
</module>
<module name="UpperEll">
<property name="severity" value="error" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Checks that long constants are defined with an upper ell. 'l' looks too much like '1'. " />
</module>
<module name="ArrayTypeStyle">
<property name="severity" value="error" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Enforce Java array type style." />
</module>
<!-- JavaDoc Checks -->
<module name="JavadocStyle">
<property name="severity" value="error" />
<property name="checkEmptyJavadoc" value="true" />
<property name="checkFirstSentence" value="true" />
<property name="checkHtml" value="true" />
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit" />
<metadata name="net.sf.eclipsecs.core.comment" value="Simple Javadoc style check." />
</module>
<module name="AtclauseOrder">
<property name="severity" value="error" />
<property name="tagOrder" value="@author, @version, @param, @return, @throws, @exception, @see, @since, @serial, @serialField, @serialData, @deprecated"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit" />
<metadata name="net.sf.eclipsecs.core.comment" value="Checks the order of Javadoc at-clauses." />
</module>
<module name="NonEmptyAtclauseDescription">
<property name="severity" value="error" />
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit" />
<metadata name="net.sf.eclipsecs.core.comment" value="Checks Javadoc At-Clause comments for descriptions." />
</module>
<module name="JavadocTagContinuationIndentation">
<property name="severity" value="error" />
<property name="offset" value="0" />
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit" />
<metadata name="net.sf.eclipsecs.core.comment" value="Checks line continuation for Javadoc comments having no indent." />
</module>
<module name="JavadocType">
<property name="severity" value="error" />
<property name="scope" value="private" />
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit" />
<metadata name="net.sf.eclipsecs.core.comment" value="Checks Javadoc comments for class and interface definitions." />
</module>
<module name="JavadocMethod">
<property name="severity" value="error" />
<property name="scope" value="private" />
<property name="allowMissingParamTags" value="false" />
<property name="validateThrows" value="false" />
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit" />
<metadata name="net.sf.eclipsecs.core.comment" value="Checks the Javadoc of a method or constructor." />
</module>
<module name="JavadocVariable">
<property name="severity" value="ignore" />
<property name="scope" value="protected" />
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit" />
<metadata name="net.sf.eclipsecs.core.comment" value="Checks that variables have Javadoc comments." />
</module>
<module name="EqualsHashCode">
<property name="severity" value="error" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Verify when Equals is overridden, hashCode is as well." />
</module>
<module name="MethodCount">
<property name="severity" value="error" />
</module>
<module name="ParameterNumber">
<property name="severity" value="warning" />
</module>
<module name="MethodLength">
<property name="severity" value="error" />
<property name="max" value="160" />
</module>
<module name="RegexpSinglelineJava">
<property name="severity" value="error" />
<property name="format" value="\.toLowerCase\(\)" />
<property name="message" value="use toLowerCase(Locale.ENGLISH)" />
<property name="ignoreComments" value="true" />
<metadata name="net.sf.eclipsecs.core.comment"
value="toLowerCase must give a locale." />
</module>
<module name="RegexpSinglelineJava">
<property name="severity" value="error" />
<property name="format" value="\.toUpperCase\(\)" />
<property name="message" value="use toUpperCase(Locale.ENGLISH)" />
<property name="ignoreComments" value="true" />
<metadata name="net.sf.eclipsecs.core.comment"
value="toUpperCase must give a locale." />
</module>
<module name="EmptyBlock">
<property name="severity" value="error" />
<property name="option" value="text" />
</module>
<module name="SeparatorWrap">
<metadata name="net.sf.eclipsecs.core.comment" value="When a line is broken at a non-assignment operator the break comes before the symbol." />
<property name="severity" value="error" />
<property name="option" value="nl" />
<property name="tokens" value="DOT,ELLIPSIS,AT" />
</module>
<module name="SeparatorWrap">
<metadata name="net.sf.eclipsecs.core.comment" value="A comma stays attached to the token that precedes it." />
<property name="severity" value="error" />
<property name="tokens" value="COMMA" />
</module>
<module name="HiddenField">
<property name="severity" value="error" />
<property name="tokens" value="VARIABLE_DEF"/>
</module>
<module name="SuppressionCommentFilter"/>
</module>
<module name="RegexpHeader">
<property name="severity" value="error" />
<property name="header"
value="// Copyright 20[0-2][0-9],? (Yahoo Inc.|Oath Inc.)\n// Licensed under the terms of the Apache license. Please see LICENSE.md file distributed with this work for terms\.\n" />
<property name="fileExtensions" value="java,groovy" />
<metadata name="net.sf.eclipsecs.core.comment"
value="Checks that the file starts with a yahoo copyright block." />
</module>
<module name="FileTabCharacter">
<property name="severity" value="error" />
<property name="eachLine" value="true" />
<metadata name="net.sf.eclipsecs.core.comment" value="Enforce no tabs, only spaces for indent." />
</module>
<module name="NewlineAtEndOfFile">
<property name="severity" value="error" />
<property name="lineSeparator" value="lf" />
<metadata name="net.sf.eclipsecs.core.comment" value="Enforce newline at end of file." />
</module>
<module name="RegexpMultiline">
<metadata name="net.sf.eclipsecs.core.comment" value="Excessive white space" />
<property name="severity" value="error" />
<property name="format" value="^\R\R\R" />
<property name="message" value="Excessive white space" />
</module>
<module name="RegexpMultiline">
<metadata name="net.sf.eclipsecs.core.comment" value="Extra space at end of file" />
<property name="severity" value="error" />
<property name="format" value="^\R\Z" />
<property name="message" value="Extra space at end of file" />
</module>
<module name="RegexpMultiline">
<metadata name="net.sf.eclipsecs.core.comment" value="Extra lines between braces" />
<property name="severity" value="error" />
<property name="format" value="\}\R\R\s?\}" />
<property name="message" value="Extra lines between braces" />
</module>
<module name="RegexpSingleline">
<metadata name="net.sf.eclipsecs.core.comment" value="Trailing space" />
<property name="severity" value="error" />
<property name="format" value="\s$" />
<property name="message" value="Trailing space" />
</module>
<module name="SuppressWarningsFilter" />
</module>