-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckstyle.xml
168 lines (157 loc) · 7.26 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
! Checkstyle-Configuration for most alltiny projects.
!-->
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<property name="severity" value="warning"/>
<module name="TreeWalker">
<property name="tabWidth" value="4"/>
<module name="GenericIllegalRegexp">
<property name="severity" value="ignore"/>
<property name="format" value="\s+$"/>
<property name="message" value="Line has trailing spaces."/>
</module>
<!-- Annotations -->
<!-- every deprecation should be commented with WHY and WHAT TO DO. -->
<module name="MissingDeprecated"/>
<!-- Block Checks -->
<module name="EmptyBlock"/>
<module name="LeftCurly"/>
<module name="NeedBraces">
<property name="tokens" value="LITERAL_IF,LITERAL_ELSE,LITERAL_DO,LITERAL_FOR,LITERAL_WHILE"/>
</module>
<module name="RightCurly"/>
<!-- nested block are necessary to define namespaces.
<module name="AvoidNestedBlocks"/> -->
<!-- Class design -->
<module name="VisibilityModifier"/>
<module name="FinalClass"/>
<module name="InterfaceIsType"/>
<module name="HideUtilityClassConstructor"/>
<module name="MutableException"/>
<!-- Coding -->
<!-- inline conditionals are an option to shorten code.
<module name="AvoidInlineConditionals"/> -->
<module name="CovariantEquals"/>
<module name="EmptyStatement"/>
<module name="EqualsAvoidNull"/>
<module name="EqualsHashCode"/>
<!-- the final local variable check does only make sense on primitive types.
<module name="FinalLocalVariable"/>-->
<!-- turned off hidden field check because it cannot deal with fluent setter methods.
! Besides with an IDE field scopes are not a problem at all.
<module name="HiddenField">
<property name="ignoreConstructorParameter" value="true"/>
<property name="ignoreSetter" value="true"/>
</module>
!-->
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<!-- considered the magic number check as too aggressive.
<module name="MagicNumber"/>-->
<module name="MissingSwitchDefault"/>
<module name="ModifiedControlVariable"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
<module name="SuperClone"/>
<module name="SuperFinalize"/>
<module name="IllegalCatch">
<property name="illegalClassNames" value="java.lang.Throwable, java.lang.RuntimeException"/>
</module>
<module name="IllegalThrows"/>
<module name="PackageDeclaration"/>
<module name="DeclarationOrder"/>
<module name="ParameterAssignment"/>
<module name="DefaultComesLast"/>
<module name="FallThrough"/>
<module name="MultipleStringLiterals">
<property name="allowedDuplicates" value="4"/>
</module>
<module name="UnnecessaryParentheses"/>
<!-- Imports -->
<!-- with usage of modern IDEs star imports are no longer a problem of intransparency. So we allow them.
<module name="AvoidStarImport"/>-->
<!-- Sun adives to use static imports VERY SPARINGLY. We don't want them in our code. -->
<module name="AvoidStaticImport"/>
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<!-- Javadoc Comments -->
<module name="JavadocType">
<property name="severity" value="warning"/>
</module>
<module name="JavadocMethod">
<property name="severity" value="warning"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
</module>
<module name="JavadocVariable">
<property name="severity" value="warning"/>
<property name="excludeScope" value="private"/>
</module>
<module name="JavadocStyle">
<property name="severity" value="warning"/>
<!--
! The check for the first sentence is buggy. (It recognizes "/**\n" as first sentence
! which is wrong is terms of http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html)
!-->
<property name="checkFirstSentence" value="false"/>
</module>
<!-- Miscellaneous -->
<module name="TodoComment">
<property name="format" value="WARNING"/>
</module>
<!-- not necessary
<module name="UpperEll"/>-->
<module name="ArrayTypeStyle"/>
<!-- not necessary
<module name="FinalParameters"/>-->
<module name="Indentation"/>
<!-- Modifiers -->
<module name="ModifierOrder"/>
<!-- better explicitly define the modifiers than falling back on the default modifiers.
<module name="RedundantModifier"/>-->
<!-- Naming -->
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<!-- Size Violations -->
<module name="LineLength">
<property name="severity" value="ignore"/>
</module>
<module name="MethodLength"/>
<module name="ParameterNumber"/>
<!-- Whitespaces -->
<module name="GenericWhitespace"/>
<module name="EmptyForInitializerPad"/>
<module name="EmptyForIteratorPad"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter">
<property name="allowLineBreaks" value="false"/>
<property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS,TYPECAST"/>
</module>
<module name="NoWhitespaceBefore"/>
<!--module name="OperatorWrap"/-->
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<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,LITERAL_ASSERT,TYPE_EXTENSION_AND,WILDCARD_TYPE"/>
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyMethods" value="true"/>
</module>
</module>
<!-- All tabs have to be replaced by 4 white-spaces. -->
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
<module name="FileLength"/>
<module name="Translation"/>
</module>