forked from alessandroleite/wattsup-java-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckstyle.xml
377 lines (307 loc) · 9.57 KB
/
checkstyle.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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<!-- Checks whether files end with a new line. -->
<module name="NewlineAtEndOfFile" />
<!-- Checks that property files contain the same keys. -->
<module name="Translation" />
<!-- Avoid tab characters in the code -->
<module name="FileTabCharacter" />
<!-- <property name="WrapOp" value="nl"/> -->
<module name="TreeWalker">
<!-- Javadoc for methods must be present/valid. -->
<module name="JavadocMethod">
<property name="allowUndeclaredRTE" value="true" />
</module>
<!-- Javadoc for class variables must be present/valid. -->
<module name="JavadocVariable" />
<!-- Javadoc must be well-formed. -->
<module name="JavadocStyle" />
<!-- Naming conventions for packages. -->
<module name="PackageName">
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$" />
</module>
<!-- Naming conventions for classes and interfaces. -->
<module name="TypeName" />
<!-- Trap trailing spaces -->
<module name="Regexp">
<property name="format" value="\s+$" />
<property name="message" value="Line has trailing spaces." />
</module>
<!-- Static variables name -->
<module name="StaticVariableName">
<property name="format" value="^[a-zA-Z][a-zA-Z0-9]*(_[a-zA-Z0-9]+)*$" />
</module>
<!-- Naming conventions for class variables. -->
<module name="MemberName">
<property name="format" value="^[a-z][a-zA-Z0-9]*_$" />
</module>
<!-- Naming conventions local variables. -->
<module name="LocalFinalVariableName" />
<module name="LocalVariableName" />
<module name="ParameterName" />
<!-- Avoid start imports -->
<module name="AvoidStarImport" />
<!-- Avoid imports of the sun.* packages -->
<module name="IllegalImport" />
<!-- Avoid redundant imports -->
<module name="RedundantImport" />
<!-- Avoid unused imports -->
<module name="UnusedImports" />
<!-- Ensure import order -->
<module name="ImportOrder">
<property name="groups" value="java,javax" />
<property name="ordered" value="true" />
<property name="separated" value="true" />
</module>
<!-- Lines should be maximum of 150 characters -->
<module name="LineLength">
<property name="max" value="150" />
<property name="ignorePattern" value="^ *\* *[^ ]+$" />
<property name="ignorePattern" value="^ *\@param*[^ ]+$" />
</module>
<!-- -->
<module name="MethodParamPad" />
<!-- No whitespace after selected tokens -->
<module name="NoWhitespaceAfter" />
<!-- -->
<module name="NoWhitespaceBefore" />
<!-- -->
<module name="OperatorWrap">
<property name="tokens"
value="ASSIGN,
BAND,
BAND_ASSIGN,
BOR,
BOR_ASSIGN,
BSR,
BSR_ASSIGN,
BXOR,
BXOR_ASSIGN,
COLON,
DIV,
DIV_ASSIGN,
EQUAL,
GE,
GT,
LAND,
LE,
LITERAL_INSTANCEOF,
LOR,
LT,
MINUS,
MINUS_ASSIGN,
MOD,
MOD_ASSIGN,
NOT_EQUAL,
PLUS,
PLUS_ASSIGN,
QUESTION,
SL,
SL_ASSIGN,
SR,
SR_ASSIGN,
STAR,
STAR_ASSIGN" />
<property name="option" value="eol" />
</module>
<!-- -->
<module name="ParenPad" />
<!-- No space in a case operation "(int)" not "( int )" -->
<module name="TypecastParenPad">
<property name="option" value="nospace" />
</module>
<!-- Space after comma, semicolon and casts -->
<module name="WhitespaceAfter">
<property name="tokens" value="COMMA, SEMI, TYPECAST" />
</module>
<!-- Ensure whitespace around all operators other than -->
<!-- GENERIC_START and GENERIC_END -->
<module name="WhitespaceAround">
<property name="tokens"
value="ASSIGN,
BAND,
BAND_ASSIGN,
BOR,
BOR_ASSIGN,
BSR,
BSR_ASSIGN,
BXOR,
BXOR_ASSIGN,
COLON,
DIV,
DIV_ASSIGN,
EQUAL,
GE,
GT,
LAND,
LCURLY,
LE,
LITERAL_ASSERT,
LITERAL_CATCH,
LITERAL_DO,
LITERAL_ELSE,
LITERAL_FINALLY,
LITERAL_FOR,
LITERAL_IF,
LITERAL_RETURN,
LITERAL_SYNCHRONIZED,
LITERAL_TRY,
LITERAL_WHILE,
LOR,
LT,
MINUS,
MINUS_ASSIGN,
MOD,
MOD_ASSIGN,
NOT_EQUAL,
PLUS,
PLUS_ASSIGN,
QUESTION,
RCURLY,
SL,
SLIST,
SL_ASSIGN,
SR,
SR_ASSIGN,
STAR,
STAR_ASSIGN,
TYPE_EXTENSION_AND,
WILDCARD_TYPE" />
</module>
<!-- Check modifier order: -->
<!-- public | protected | private -->
<!-- abstract -->
<!-- static -->
<!-- final -->
<!-- transient | volatile -->
<!-- synchronized -->
<!-- native -->
<!-- strictfp -->
<module name="ModifierOrder" />
<!-- Avoid redundant modifiers -->
<module name="RedundantModifier" />
<!-- Avoid empty blocks -->
<module name="EmptyBlock" />
<!-- Classes, interfaces and methods have left brace on a new line -->
<module name="LeftCurly">
<property name="option" value="nl" />
<property name="maxLineLength" value="120" />
<property name="tokens"
value="CLASS_DEF,
CTOR_DEF,
INTERFACE_DEF,
METHOD_DEF,
LITERAL_CATCH,
LITERAL_DO,
LITERAL_ELSE,
LITERAL_FINALLY,
LITERAL_FOR,
LITERAL_IF,
LITERAL_SWITCH,
LITERAL_SYNCHRONIZED,
LITERAL_TRY,
LITERAL_WHILE" />
</module>
<!-- TODO -->
<module name="RightCurly">
<property name="option" value="alone" />
<property name="tokens"
value="LITERAL_CATCH,LITERAL_FINALLY, LITERAL_ELSE" />
</module>
<!-- Avoid nested blocks other than in switch statements -->
<module name="AvoidNestedBlocks">
<property name="allowInSwitchCase" value="true" />
</module>
<!-- Checks that classes that define a covariant equals() method -->
<!-- also override method equals(java.lang.Object) -->
<module name="CovariantEquals" />
<!-- Avoid empty statements -->
<module name="EmptyStatement" />
<!-- Checks that classes that override equals() -->
<!-- also override hashCode() -->
<module name="EqualsHashCode" />
<!-- Check that a name doens't hide another name -->
<module name="HiddenField" />
<!-- Avoid inner assignments -->
<module name="InnerAssignment" />
<!-- Require default clause in switch statements -->
<module name="MissingSwitchDefault" />
<!-- Avoid modifying control variables -->
<module name="ModifiedControlVariable" />
<!-- Avoid redundant throws -->
<module name="RedundantThrows">
<property name="allowUnchecked" value="true" />
</module>
<!-- Require simple boolean expressions -->
<module name="SimplifyBooleanExpression" />
<!-- Require simple boolean expressions -->
<module name="SimplifyBooleanReturn" />
<!-- Capture string compare using == -->
<module name="StringLiteralEquality" />
<!-- Checks that an overriding clone() method invokes super.clone() -->
<module name="SuperClone" />
<!-- Checks that an overriding finalize() method invokes -->
<!-- super.finalize() -->
<module name="SuperFinalize" />
<!-- Disallow throwing exception base classes -->
<module name="IllegalThrows">
<property name="ignoredMethodNames"
value="finalize,invoke,invokeAdvice,proceed,execute, aroundFileOutputStreamWriteOperation" />
</module>
<!-- Require all classes to be in a package -->
<module name="PackageDeclaration" />
<!-- Ensures correct layout of JUnit test cases -->
<module name="JUnitTestCase" />
<!-- Enforce the following declaration order: -->
<!-- 1. Class variables -->
<!-- 2. Instance variables -->
<!-- 3. Ctors -->
<!-- 4. Methods -->
<module name="DeclarationOrder" />
<!-- Disallow parameter assignment -->
<module name="ParameterAssignment" />
<!-- Ensure the default clasue is the last case in a switch -->
<module name="DefaultComesLast" />
<!-- Disallow non-commented swicth fall throug -->
<module name="FallThrough" />
<!-- Each variable should be declared individually -->
<module name="MultipleVariableDeclarations" />
<!-- Avoid unnecessary parantheses -->
<module name="UnnecessaryParentheses" />
<!-- Make sure only static finals are public -->
<module name="VisibilityModifier" />
<!-- Class with private constructor must be final -->
<module name="FinalClass" />
<!-- Utility classes should have private ctor -->
<module name="HideUtilityClassConstructor" />
<!-- Ensures that exception classes are immutable -->
<module name="MutableException" />
<!-- Flag overly complex constructions -->
<module name="ClassFanOutComplexity">
<property name="max" value="35" />
</module>
<module name="CyclomaticComplexity">
<property name="max" value="35" />
</module>
<module name="NPathComplexity" />
<!-- Identify TODOs -->
<module name="TodoComment">
<property name="format" value="TODO" />
</module>
<!-- Flag uncommented main() methods (debugging left-overs) -->
<module name="UncommentedMain">
<property name="excludedClasses" value="\.Main$" />
</module>
<!-- Require long constants to be defined by uppercase L -->
<module name="UpperEll" />
<!-- Array brackets on type not variable -->
<module name="ArrayTypeStyle" />
<!-- Avoid explicit initialization to the default value -->
<module name="ExplicitInitialization" />
<!-- Avoid trailing comments -->
<module name="TrailingComment" />
</module>
</module>