forked from web-cat/web-cat-plugin-JavaTddPlugin
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcheckstyle.xml
More file actions
492 lines (460 loc) · 30.1 KB
/
Copy pathcheckstyle.xml
File metadata and controls
492 lines (460 loc) · 30.1 KB
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
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!--
Checkstyle configuration for Web-CAT JavaTddPlugin
-->
<module name="Checker">
<!-- Checks whether files end with a new line. -->
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
<!-- <module name="NewlineAtEndOfFile"/>
Doesn't seem to work under windows or something: false triggering!
-->
<module name="FileTabCharacter"/>
<module name="TreeWalker">
<property name="tabWidth" value="4" />
<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<module name="JavadocMethod">
<property name="validateThrows" value="false"/>
<!-- <property name="allowMissingReturnTag" value="true"/> -->
<property name="accessModifiers" value="public,protected,package"/>
<message key="javadoc.duplicateTag"
value="This {0} tag already appears elsewhere in this Javadoc comment, but it should only appear once (@param tags should only appear once per distinct parameter name). Remove the repeated occurrences."/>
<message key="javadoc.missing"
value="The Javadoc for this method or constructor is missing. All visible (i.e. not private) methods and constructors must be documented."/>
<message key="javadoc.expectedTag"
value="The {0} tag for the parameter ''{1}'' is missing or incomplete. The @param tag should be followed by the name of the parameter and then a description of the purpose of that parameter (i.e. the size of the list, the first name of the customer, etc.). There should be one @param tag for each parameter in the method or constructor."/>
<message key="javadoc.unusedTagGeneral"
value="This tag does not seem to be needed for this method or constructor (i.e. a @return tag for a method with a return type of void or a @param tag for a parameter that does not exist). Check for spelling mistakes or remove the tag if it is not needed."/>
<message key="javadoc.return.expected"
value="The @return tag for this method is missing or incomplete. Because the return type is not void, there should be a @return tag followed by a description of the value being returned (what it is, not the variable name) and anything special about it that the user should know (i.e. it returns -1 on an error, etc.)."/>
<message key="javadoc.unusedTag"
value="This tag does not seem to be needed for this method or constructor (i.e. a @return tag for a method with a return type of void or a @param tag for a parameter that does not exist). Check for spelling mistakes or remove the tag if it is not needed."/>
</module>
<!-- <module name="JavadocMethod">
<property name="allowUndeclaredRTE" value="true"/>
<property name="allowThrowsTagsForSubclasses" value="true"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="excludeScope" value="package"/>
<message key="javadoc.missing"
value="The Javadoc for this method or constructor is missing. All private methods and constructors must include a description of their purpose."/>
<message key="javadoc.duplicateTag"
value="This {0} tag already appears elsewhere in this Javadoc comment, but it should only appear once (@param tags should only appear once per distinct parameter name). Remove the repeated occurrences."/>
<message key="javadoc.unusedTagGeneral"
value="This tag does not seem to be needed for this method or constructor (i.e. a @return tag for a method with a return type of void or a @param tag for a parameter that does not exist). Check for spelling mistakes or remove the tag if it is not needed."/>
<message key="javadoc.unusedTag"
value="This tag does not seem to be needed for this method or constructor (i.e. a @return tag for a method with a return type of void or a @param tag for a parameter that does not exist). Check for spelling mistakes or remove the tag if it is not needed."/>
</module> -->
<module name="JavadocType">
<property name="authorFormat" value="\S"/>
<property name="versionFormat" value="\S"/>
<property name="scope" value="package"/>
<message key="type.missingTag"
value="The {0} tag for this class or interface is missing from its Javadoc comment. @author tags should be followed by your name and your user name (use multiple @author tags for partner(s), if any) and the @version tag should be followed by the date (2013-01-31) or a version number (1.0, 2.0, etc.)."/>
<message key="javadoc.missing"
value="The Javadoc for this class or interface is missing. All visible (i.e. not private) classes and interfaces must be documented."/>
<message key="javadoc.unusedTagGeneral"
value="This tag does not seem to be needed for this class or interface. Check for spelling mistakes or remove the tag if it is not needed."/>
<message key="javadoc.unusedTag"
value="This tag does not seem to be needed for this class or interface. Check for spelling mistakes or remove the tag if it is not needed."/>
<message key="type.tagFormat"
value="The {0} tag in this Javadoc comment is incomplete. @author tags should be followed by your name and your user name (use multiple @author tags for partner(s), if any) and the @version tag should be followed by the date (2013-01-31) or a version number (1.0, 2.0, etc.)."/>
</module>
<module name="JavadocVariable">
<property name="scope" value="package"/>
<message key="javadoc.missing"
value="The Javadoc for this field is missing. All visible (i.e. not private) fields require a Javadoc comment. Describe the purpose of the field and any special information about its use. If the field is not a constant, it should be private."/>
</module>
<!-- <module name="JavadocStyle">
<property name="scope" value="package"/>
<property name="checkEmptyJavadoc" value="true"/>
<property name="checkFirstSentence" value="false"/>
<message key="javadoc.empty"
value="This Javadoc comment is missing its description. Describe the purpose of this in a Javadoc comment before adding any appropriate tags (i.e. @author, @param, etc.). Describe what the class represents or what the method does. You generally do not need to describe how it is being done."/>
</module> -->
<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
<module name="ConstantName">
<property name="format" value="^([A-Z][A-Z0-9]*(_[A-Z0-9]+)*|log|question[0-9]+)$"/>
<message key="name.invalidPattern"
value="Constants (fields declared to be final) should be named in all capital letters with _ between words. Rename the constant ''{0}''."/>
</module>
<module name="LocalVariableName">
<message key="name.invalidPattern"
value="Variables should be named in camelCase where the name starts with a lowercase letter and the first letter of each subsequent word is capitalized. Rename the variable ''{0}''."/>
</module>
<module name="LocalFinalVariableName">
<message key="name.invalidPattern"
value="Variables should be named in camelCase where the name starts with a lowercase letter and the first letter of each subsequent word is capitalized. Rename the variable ''{0}''."/>
</module>
<module name="MemberName">
<message key="name.invalidPattern"
value="Fields should be named in camelCase where the name starts with a lowercase letter and the first letter of each subsequent word is capitalized. Rename the field ''{0}''."/>
</module>
<module name="MethodName">
<!-- PMD generates the message for class named methods, so skip here -->
<property name="allowClassName" value="true"/>
<message key="name.invalidPattern"
value="Methods should be named in camelCase where the name starts with a lowercase letter and the first letter of each subsequent word is capitalized. Rename the method ''{0}''."/>
</module>
<!-- Common conventions (e.g., Sun coding conventions, etc.) indicate
package names should be all lower-case "to avoid conflict with
the names of classes or interfaces" (from the Java Tutorial). For
professional developers, underscores are used in place of hyphens
or to separate lower-case words. But many educational courses use
course-specific packages with camelCase names or with upper case
letters (violating the Sun conventions). Since these two
conventions clash with each other, no one pattern works well for
everyone, so this rule is commented out.
<module name="PackageName">
<message key="name.invalidPattern"
value="Packages should be named in all lower case. Periods should separate the parts of the package. Rename the package ''{0}''."/>
</module>
-->
<module name="ParameterName">
<message key="name.invalidPattern"
value="Parameters should be named in camelCase where the name starts with a lowercase letter and the first letter of each subsequent word is capitalized. Rename the parameter ''{0}''."/>
</module>
<module name="StaticVariableName">
<message key="name.invalidPattern"
value="Fields should be named in camelCase where the name starts with a lowercase letter and the first letter of each subsequent word is capitalized. Rename the field ''{0}''."/>
</module>
<module name="TypeName">
<message key="name.invalidPattern"
value="Classes and interfaces should be named in CamelCase where the name starts with a capital letter and the first letter of each subsequent word is also capitalized. Rename the class/interface ''{0}''."/>
</module>
<module name="MethodTypeParameterName">
<property name="format" value="^[A-Z][a-zA-Z0-9]*$"/>
<message key="name.invalidPattern"
value="Generic parameter names that represent types should be named in CamelCase where the name starts with a capital letter and the first letter of each subsequent word is also capitalized. Rename the parameter ''{0}''."/>
</module>
<module name="ClassTypeParameterName">
<property name="format" value="^[A-Z][a-zA-Z0-9]*$"/>
<message key="name.invalidPattern"
value="Generic parameter names that represent types should be named in CamelCase where the name starts with a capital letter and the first letter of each subsequent word is also capitalized. Rename the parameter ''{0}''."/>
</module>
<!-- Checks for Headers -->
<!-- See http://checkstyle.sf.net/config_header.html -->
<!--
<module name="Header"> -->
<!-- The follow property value demonstrates the ability -->
<!-- to have access to ANT properties. In this case it uses -->
<!-- the ${basedir} property to allow Checkstyle to be run -->
<!-- from any directory within a project. -->
<!--
<property name="headerFile" value="${basedir}/java.header"/>
</module>
-->
<!-- Following interprets the header file as regular expressions. -->
<!-- <module name="RegexpHeader"/> -->
<!-- Checks for imports -->
<!-- See http://checkstyle.sf.net/config_import.html -->
<!-- <module name="AvoidStarImport"/> -->
<!-- <module name="IllegalImport"/> -->
<!-- defaults to sun.* packages -->
<!-- <module name="RedundantImport"/> -->
<!-- <module name="UnusedImports"/> -->
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="Indentation">
<property name="basicOffset" value="4"/>
<property name="braceAdjustment" value="0"/>
<property name="caseIndent" value="4"/>
<message key="indentation.error"
value="To improve readability, each line of code should be indented under its parent (i.e. methods should be indented under the class, code in methods should be indented under the method, code in if statements should be indented under the if, etc.). This {0} is {1} spaces from the margin and it should be at {2} spaces."/>
<message key="indentation.child.error"
value="To improve readability, each line of code should be indented under its parent (i.e. methods should be indented under the class, code in methods should be indented under the method, code in if statements should be indented under the if, etc.). This {0} is {1} spaces from the margin and it should be at {2} spaces."/>
</module>
<!--
<module name="EmptyForIteratorPad">
<property name="option" value="space"/>
</module>
-->
<module name="NoWhitespaceAfter">
<property name="tokens"
value="BNOT,DEC,INC,UNARY_MINUS,UNARY_PLUS"/>
<property name="allowLineBreaks" value="false"/>
<message key="ws.followed"
value="''{0}'' is followed by whitespace (i.e. a space, tab, or new line) and it should not be. For readablilty, remove the spaces between ''{0}'' and the next value."/>
</module>
<module name="NoWhitespaceBefore">
<property name="tokens" value="POST_DEC,POST_INC"/>
<message key="ws.preceded"
value="''{0}'' is preceded by whitespace (i.e. a space, tab, or new line) and it should not be. For readablilty, remove the spaces before ''{0}''."/>
</module>
<module name="NoWhitespaceBefore">
<property name="tokens" value="DOT"/>
<property name="allowLineBreaks" value="true"/>
<message key="ws.preceded"
value="''{0}'' is preceded by whitespace (i.e. a space or a tab) and it should not be. For readablilty, remove the spaces before ''{0}''."/>
</module>
<!--
<module name="OperatorWrap">
<message key="line.new"
value="''{0}'' should be on a new line. In general, operators should not end a line but should be at the start on the next line."/>
<message key="line.previous"
value="''{0}'' should be on the previous line. This operator should be at the end of the previous line instead of at the beginning of this line."/>
</module>
<module name="OperatorWrap">
<property name="tokens"
value="ASSIGN, DIV_ASSIGN, PLUS_ASSIGN, MINUS_ASSIGN, STAR_ASSIGN, MOD_ASSIGN, SR_ASSIGN, BSR_ASSIGN, SL_ASSIGN, BXOR_ASSIGN, BOR_ASSIGN, BAND_ASSIGN"/>
<property name="option" value="eol"/>
<message key="line.new"
value="''{0}'' should be on a new line. In general, operators should not end a line but should be at the start on the next line."/>
<message key="line.previous"
value="''{0}'' should be on the previous line. This operator should be at the end of the previous line instead of at the beginning of this line."/>
</module>
-->
<module name="WhitespaceAfter">
<property name="tokens" value="COMMA, SEMI"/>
<message key="ws.notFollowed"
value="''{0}'' is not followed by whitespace (i.e. a space, tab, or new line). Add a space after the ''{0}''."/>
</module>
<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, RCURLY, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXTENSION_AND, QUESTION"/>
<message key="ws.notPreceded"
value="''{0}'' is not preceded with whitespace (i.e. a space, tab, or new line). Most operators should have spaces both before and after them to improve readability."/>
<message key="ws.notFollowed"
value="''{0}'' is not followed by whitespace (i.e. a space, tab, or new line). Most operators should have spaces both before and after them to improve readability."/>
</module>
<module name="MethodParamPad">
<message key="ws.preceded"
value="''{0}'' is preceded by whitespace (i.e. a space, tab, or new line) and it should not be. For readablilty, remove the spaces before ''{0}''."/>
<message key="ws.notPreceded"
value="''{0}'' is not preceded by whitespace (i.e. a space, tab, or new line) and it should be. For readablilty, add a space before ''{0}''."/>
<message key="line.previous"
value="''{0}'' should be on the previous line with the name of the method/constructor."/>
</module>
<module name="GenericWhitespace">
<message key="ws.followed"
value="''{0}'' is followed by whitespace (i.e. a space, tab, or new line). There should not be a space after a < or after a > in a generic parameter list. If there are multiple >''s in the generic parameter list, there should not be spaces between them."/>
<message key="ws.illegalFollow"
value="''{0}'' is followed by an illegal character. There should be a space after the last > in generic parameter list."/>
<message key="ws.preceded"
value="''{0}'' is preceded by whitespace (i.e. a space, tab, or new line). There should not be a space before a < or before a > in a generic parameter list. If there are multiple >''s in a generic parameter list, there should not be spaces between them."/>
<!-- The next message is never used, since it contradicts the rule,
which is non-configurable. -->
<message key="ws.notPreceded"
value="''{0}'' is not preceded by whitespace (i.e. a space, tab, or new line). There should be a space before the first < in generic value."/>
</module>
<!-- Modifier Checks -->
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
<!-- <module name="ModifierOrder"/> -->
<!-- <module name="RedundantModifier"/> -->
<!-- Checks for blocks. You know, those {}'s -->
<!-- See http://checkstyle.sf.net/config_blocks.html -->
<!--
<module name="AvoidNestedBlocks">
<property name="allowInSwitchCase" value="true"/>
</module>
-->
<!-- <module name="EmptyBlock"/> :let PMD handle other empty blocks -->
<module name="EmptyBlock">
<property name="option" value="text"/>
<property name="tokens" value="LITERAL_CATCH"/>
</module>
<!--
<module name="LeftCurly">
<property name="option" value="nl"/>
</module>
-->
<!-- PMD handles required braces, except for do loops -->
<module name="NeedBraces">
<property name="tokens" value="LITERAL_DO"/>
<message key="needBraces"
value="Loops, if statements and else blocks should always include '''{ }''' around their statements. Add braces to the ''{0}'' construct."/>
</module>
<module name="RightCurly">
<property name="option" value="alone"/>
<message key="line.alone" value="This ''{0}'' should be alone on a line (i.e. no other code should be after it on the same line)."/>
<message key="line.new" value="This ''{0}'' should be on a new line instead of on the same line as other code."/>
<!-- this next message is unused for the current configuration. -->
<message key="line.same" value="This ''{0}'' should be on the same line as the code above it."/>
</module>
<!-- Checks for common coding problems -->
<!-- See http://checkstyle.sf.net/config_coding.html -->
<!-- <module name="AvoidInlineConditionals"/> -->
<module name="CovariantEquals">
<message key="covariant.equals"
value="This class defines a ''covariant'' equals() method (i.e., where the argument is the same type as this class), but it does not override the method equals(Object). Mistakenly defining equals() with the wrong parameter type is an error that can produce unexpected run-time behavior. Add a meaningful definition for equals(Object), or correct your existing equals() method."/>
</module>
<module name="EmptyStatement">
<message key="empty.statement"
value="This statement is just a '';'' and, therefore, does nothing. You may have added a '';'' in an inappropriate location (like after an if or a for loop). See if you are missing code or just delete the extra '';''."/>
</module>
<!-- <module name="EqualsAvoidNull"/> -->
<!-- <module name="EqualsHashCode"/> :let PMD handle this -->
<!-- <module name="FinalLocalVariable"/> -->
<module name="HiddenField">
<property name="ignoreConstructorParameter" value="true"/>
<property name="ignoreSetter" value="true"/>
<property name="ignoreAbstractMethods" value="true"/>
<message key="hidden.field"
value="''{0}'' has the same name as one of the class's fields. This is generally confusing and should be avoided. Rename the parameter or local variable so that there is no conflict."/>
</module>
<!-- <module name="IllegalInstantiation"/> -->
<!-- <module name="IllegalToken"/> -->
<!-- <module name="InnerAssignment"/> :let PMD handle this -->
<!--
<module name="MagicNumber">
<message key="magic.number"
value="''{0}'' is a magic number and should be made into a constant. You can declare it locally with ''final'' or as part of the class with ''static final''."/>
</module>
-->
<!-- <module name="MissingSwitchDefault"/> :let PMD handle this -->
<!-- <module name="ModifiedControlVariable"/> -->
<!-- <module name="RedundantThrows">
<property name="allowUnchecked" value="true"/>
<message key="redundant.throws.subclass"
value="Redundant throws clause: ''{0}'' is subclass of ''{1}'' and does not need to be included in the throws clause."/>
< This message is unused in this configuration >
<message key="redundant.throws.unchecked"
value="Redundant throws clause: ''{0}'' is an unchecked exception and does not need to be declared."/>
</module-->
<!-- <module name="SimplifyBooleanExpression"/> :let PMD handle this -->
<!-- <module name="SimplifyBooleanReturn"/> :let PMD handle this -->
<module name="StringLiteralEquality">
<message key="string.literal.equality"
value="Literal Strings should be compared using equals(), not ''{0}''. The == and != operators compare the references of objects, not their values. Using the equals() (or equalsIgnoreCase()) method will compare the values of the Strings instead."/>
</module>
<!-- <module name="NestedForDepth"/> -->
<!-- <module name="NestedIfDepth"/> -->
<!-- <module name="NestedTryDepth"/> -->
<!-- <module name="NoClone"/> -->
<!-- <module name="NoFinalizer"/> -->
<!-- <module name="SuperClone"/> -->
<!-- <module name="SuperFinalize"/> -->
<!-- <module name="IllegalCatch"/> -->
<!-- <module name="IllegalThrows"/> -->
<!-- <module name="PackageDeclaration"/> -->
<!-- <module name="JUnitTestCase"/> -->
<!-- <module name="ReturnCount"/> -->
<!-- <module name="IllegalType"/> -->
<!-- <module name="DeclarationOrder"/> -->
<!-- <module name="ParameterAssignment"/> -->
<!-- <module name="ExplicitInitialization"/> -->
<module name="DefaultComesLast">
<message key="default.comes.last"
value="To improve readability, the default case should be the last case in a switch statement."/>
</module>
<!-- <module name="MissingCtor"/> -->
<module name="FallThrough">
<message key="fall.through"
value="The case above will fall through and run the code in this case too. This may be an indication that a break statement is missing at the end of the previous case. If this is the intended functionality, add a comment on the last line of the previous case with the phrase ''falls through'' to indicate that."/>
</module>
<!-- <module name="MultipleStringLiterals"/> -->
<module name="MultipleVariableDeclarations">
<message key="multiple.variable.declarations.comma"
value="To make the code more readable, place each variable or field in its own declaration on a separate line."/>
<message key="multiple.variable.declarations"
value="To make the code more readable, place each variable or field in its own declaration on a separate line."/>
</module>
<!-- <module name="RequireThis"/> -->
<!-- <module name="UnnecessaryParentheses"/> -->
<module name="OneStatementPerLine">
<message key="multiple.statements.line"
value="To make the code more readable, place each statement on a separate line."/>
</module>
<!-- Checks for class design -->
<!-- See http://checkstyle.sf.net/config_design.html -->
<!-- <module name="DesignForExtension"/> -->
<!-- <module name="FinalClass"/> -->
<!-- <module name="HideUtilityClassConstructor"/> -->
<!-- <module name="InterfaceIsType"/> -->
<module name="VisibilityModifier">
<property name="protectedAllowed" value="true"/>
<message key="variable.notPrivate"
value="The field ''{0}'' should be declared private. Only constants (static final fields) are allowed to be public. If this field is intended to represent a constant value, declare it to be static and final."/>
</module>
<!-- Miscellaneous other checks. -->
<!-- See http://checkstyle.sf.net/config_misc.html -->
<module name="ArrayTypeStyle">
<message key="array.type.style"
value="Use the Java style of declaring arrays with the [] coming after the type name instead of after the variable name. That is, use ''int[] x'' instead of ''int x[]''."/>
</module>
<!-- <module name="FinalParameters"/> -->
<module name="InnerAssignment">
<message key="assignment.inner.avoid"
value="Avoid assigning values to variables as part of a larger expression. It is difficult to read correctly and may cause confusion. Make each assignment a separate statement."/>
</module>
<!--
<module name="GenericIllegalRegexp">
<property name="format" value="\s+$"/>
<property name="message" value="Line has trailing spaces."/>
</module>
-->
<module name="TodoComment">
<property name="format" value="TODO|FIX\s*ME"/>
<message key="todo.match"
value="TODO and FIX ME comment are indicators that something is not complete in your code. Address the issue and then remove the notation."/>
</module>
<module name="UpperEll">
<message key="upperEll"
value="When declaring a literal long value, use an uppercase ''L'' instead of a lowercase ''l''. This avoids the confusion between the lowercase ''l'' (ell) and the number ''1''."/>
</module>
<module name="DescendantToken">
<property name="tokens" value="EQUAL,NOT_EQUAL"/>
<property name="limitedTokens" value="STRING_LITERAL"/>
<property name="maximumNumber" value="0"/>
<property name="maximumDepth" value="1"/>
<property name="maximumMessage"
value="Do not compare object references when you intend to compare String objects. Use the equals() method instead."/>
</module>
</module>
<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<!--
<module name="FileLength">
<property name="max" value="2700"/>
</module>
-->
<module name="LineLength">
<property name="ignorePattern" value="^ *\* *[^ ]+$"/>
<message key="maxLineLen"
value="This line is longer than {0,number,integer} characters. Break it into multiple lines so that it is easier to read."/>
</module>
<!-- <module name="MethodLength"/> -->
<!-- <module name="ParameterNumber"/> -->
<module name="RegexpSingleline">
<property name="format" value="^\s*\*\s*(Write|Place) a.*here\.\s*$"/>
<property name="message" value="Please write your own descriptive comment."/>
</module>
<module name="RegexpSingleline">
<property name="format" value="^\s*\*\s*Replace this.*with your own\.\s*$"/>
<property name="message" value="Please write your own descriptive comment."/>
</module>
<module name="RegexpSingleline">
<property name="format" value="^\s*\*\s*@author\s+Partner( [1-9])?'s\s+name"/>
<property name="message" value="Place your partner's name (and user name) after the @author tag, if you have a partner (or delete the comment, if you do not)."/>
</module>
<module name="RegexpSingleline">
<property name="format" value="^\s*\*\s*@author\s+.*\byour(-|\s+)(name|pid|username)"/>
<property name="message" value="Place your own name (and user name) after the @author tag. If you are working with a partner, place each person's name (and user name) in a separate @author tag on a separate line."/>
</module>
<module name="RegexpSingleline">
<property name="format" value="^\s*\*\s*@version.*place the date here"/>
<property name="message" value="Place the date after the @version tag."/>
</module>
<!-- disallow System.out.print in the code
<module name="RegexpMultiline">
<property name="format" value="System\.\n?out\.\n?print"/>
<property name="message"
value="Do not use System.out for output. Use a PrintWriter instead."/>
</module>
-->
<!-- New check. Goes along with SimplifyBooleanReturn but catches the
case where the second return is not in an else -->
<module name="RegexpMultiline">
<property name="format"
value="(if\s*([^{};]*)\s*\{?\s*return\s+true\s*;\s*\}?\s*return\s+false\s*;|if\s*([^{};]*)\s*\{?\s*return\s+false\s*;\s*\}?\s*return\s+true\s*;)"/>
<property name="message"
value="This if statement can be removed. If you are returning true when the if statement's Boolean condition is true, and false when the statement's condition is false, then you can simply return the condition instead (i.e. return x < 5;). If you are returning false when the if statment's condition is true and returning true in the else branch, you can just return the NOT (!) of the condition instead (i.e. return !okay;)."/>
</module>
<!-- duplicate code checks. -->
<!-- <module name="StrictDuplicateCode"/> -->
</module>