forked from yahoo/elide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkstyle-style.xml
257 lines (255 loc) · 12.8 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2015, Yahoo Inc.
~ Licensed under the Apache License, Version 2.0
~ See LICENSE file in project root for terms.
-->
<!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: elide
Description: none
-->
<module name="Checker">
<property name="severity" value="warning"/>
<module name="TreeWalker">
<module name="AvoidStarImport">
<property name="excludes" value="JsonApiDSL"/>
<metadata name="net.sf.eclipsecs.core.comment" value="Removes wildcard imports."/>
<property name="allowClassImports" value="false"/>
<property name="allowStaticMemberImports" value="false"/>
</module>
<module name="CustomImportOrder">
<metadata name="net.sf.eclipsecs.core.comment" value="Not enough groups to handle unusual Elide import order. Used special formatting for thirdPartyPackageRegExp to leave java and javax to the end."/>
<property name="severity" value="error"/>
<property name="customImportOrderRules" value="STATIC###SPECIAL_IMPORTS###STANDARD_JAVA_PACKAGE###THIRD_PARTY_PACKAGE"/>
<property name="specialImportsRegExp" value="^(com\.yahoo)\."/>
<property name="standardPackageRegExp" value="^(com|example|org)\."/>
<property name="thirdPartyPackageRegExp" value="^([^j]|j[^a]|ja[^v]|java[^x.]).*"/>
<property name="sortImportsInGroupAlphabetically" value="true"/>
<property name="separateLineBetweenGroups" value="false"/>
</module>
<module name="SuppressionXpathSingleFilter">
<property name="checks" value="CustomImportOrder"/>
<property name="message" value="^Extra separation in import group before.*"/>
</module>
<module name="ConstantName">
<metadata name="net.sf.eclipsecs.core.comment" value="Constants (static finals) must be uppercase letters/digits/underscore."/>
<property name="severity" value="error"/>
<property name="format" value="^[A-Z][A-Z0-9_]*$"/>
</module>
<module name="RedundantImport">
<metadata name="net.sf.eclipsecs.core.comment" value="Duplicate import checking."/>
<property name="severity" value="error"/>
</module>
<module name="UnusedImports">
<metadata name="net.sf.eclipsecs.core.comment" value="Unused imports checking."/>
<property name="severity" value="error"/>
</module>
<module name="MethodName">
<metadata name="net.sf.eclipsecs.core.comment" value="Method name check."/>
<property name="severity" value="error"/>
</module>
<module name="LocalVariableName">
<metadata name="net.sf.eclipsecs.core.comment" value="Local variable name check."/>
<property name="severity" value="error"/>
</module>
<module name="LocalFinalVariableName">
<metadata name="net.sf.eclipsecs.core.comment" value="Local final variable name check."/>
<property name="severity" value="error"/>
</module>
<module name="MemberName">
<metadata name="net.sf.eclipsecs.core.comment" value="Member name check."/>
<property name="severity" value="error"/>
</module>
<module name="TypeName">
<metadata name="net.sf.eclipsecs.core.comment" value="Class name check."/>
<property name="severity" value="error"/>
</module>
<module name="LeftCurly">
<metadata name="net.sf.eclipsecs.core.comment" value="Left curly goes on end of line (eol)."/>
<property name="severity" value="error"/>
<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"/>
</module>
<module name="RightCurly">
<metadata name="net.sf.eclipsecs.core.comment" value="Right curly goes same line as 'else', 'try', and 'catch'."/>
<property name="severity" value="error"/>
<property name="tokens" value="LITERAL_TRY,LITERAL_CATCH,LITERAL_FINALLY,LITERAL_ELSE"/>
</module>
<module name="NeedBraces">
<metadata name="net.sf.eclipsecs.core.comment" value="Need braces for all code blocks."/>
<property name="severity" value="error"/>
</module>
<module name="WhitespaceAround">
<metadata name="net.sf.eclipsecs.core.comment" value="Checks that a token is surrounded by whitespace."/>
<property name="severity" value="error"/>
</module>
<module name="WhitespaceAfter">
<metadata name="net.sf.eclipsecs.core.comment" value="Checks that a token is followed by whitespace."/>
<property name="severity" value="error"/>
</module>
<module name="ParenPad">
<metadata name="net.sf.eclipsecs.core.comment" value="Checks the policy on the padding of parentheses."/>
<property name="severity" value="error"/>
</module>
<module name="GenericWhitespace">
<metadata name="net.sf.eclipsecs.core.comment" value="Fails if there is whitespace around generic '<' '>' characters."/>
<property name="severity" value="error"/>
</module>
<module name="CyclomaticComplexity">
<metadata name="net.sf.eclipsecs.core.comment" value="Cyclomatic complexity limit of 15."/>
<property name="severity" value="warning"/>
<property name="max" value="15"/>
</module>
<module name="UpperEll">
<metadata name="net.sf.eclipsecs.core.comment" value="Checks that long constants are defined with an upper ell. 'l' looks too much like '1'. "/>
<property name="severity" value="error"/>
</module>
<module name="ArrayTypeStyle">
<metadata name="net.sf.eclipsecs.core.comment" value="Enforce Java array type style."/>
<property name="severity" value="error"/>
</module>
<module name="JavadocStyle">
<metadata name="net.sf.eclipsecs.core.comment" value="Simple Javadoc style check."/>
<property name="severity" value="warning"/>
<property name="checkEmptyJavadoc" value="true"/>
<property name="checkFirstSentence" value="true"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="JavadocType">
<metadata name="net.sf.eclipsecs.core.comment" value="Checks Javadoc comments for class and interface definitions."/>
<property name="severity" value="error"/>
<property name="scope" value="protected"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="JavadocMethod">
<metadata name="net.sf.eclipsecs.core.comment" value="Checks the Javadoc of a method or constructor."/>
<property name="severity" value="warning"/>
<property name="accessModifiers" value="protected"/>
<property name="validateThrows" value="true"/>
<property name="allowMissingParamTags" value="true"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="JavadocVariable">
<metadata name="net.sf.eclipsecs.core.comment" value="Checks that variables have Javadoc comments."/>
<property name="severity" value="ignore"/>
<property name="scope" value="protected"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="EqualsHashCode">
<metadata name="net.sf.eclipsecs.core.comment" value="Verify when Equals is overridden, hashCode is as well."/>
<property name="severity" value="error"/>
</module>
<module name="MethodCount">
<property name="severity" value="warning"/>
</module>
<module name="ParameterNumber">
<property name="severity" value="warning"/>
</module>
<module name="MethodLength">
<property name="severity" value="error"/>
</module>
<module name="RegexpSinglelineJava">
<metadata name="net.sf.eclipsecs.core.comment" value="toLowerCase must give a locale."/>
<property name="severity" value="error"/>
<property name="format" value="\.toLowerCase\(\)"/>
<property name="message" value="use toLowerCase(Locale.ENGLISH)"/>
<property name="ignoreComments" value="true"/>
</module>
<module name="RegexpSinglelineJava">
<metadata name="net.sf.eclipsecs.core.comment" value="toUpperCase must give a locale."/>
<property name="severity" value="error"/>
<property name="format" value="\.toUpperCase\(\)"/>
<property name="message" value="use toUpperCase(Locale.ENGLISH)"/>
<property name="ignoreComments" value="true"/>
</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="OperatorWrap">
<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"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE.OFF\: ([\w\|]+)"/>
<property name="onCommentFormat" value="CHECKSTYLE.ON\: ([\w\|]+)"/>
<property name="checkFormat" value="$1"/>
</module>
</module>
<module name="SuppressWithPlainTextCommentFilter"/>
<module name="LineLength">
<metadata name="net.sf.eclipsecs.core.comment" value="Line length of 120 characters except for import lines."/>
<property name="severity" value="error"/>
<property name="ignorePattern" value="^import.*$"/>
<property name="max" value="120"/>
<property name="tabWidth" value="4"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="RegexpSingleline">
<metadata name="net.sf.eclipsecs.core.comment" value="Don't allow non-ASCII characters."/>
<property name="severity" value="error"/>
<property name="format" value="[\u0080-\uffff]"/>
<property name="message" value="Non-ASCII character"/>
</module>
<module name="RegexpHeader">
<metadata name="net.sf.eclipsecs.core.comment" value="Checks that the file starts with a yahoo/apache copyright block."/>
<property name="severity" value="error"/>
<property name="headerFile" value="java.header"/>
<property name="multiLines" value="2"/>
<property name="fileExtensions" value="java,groovy,g4"/>
</module>
<module name="RegexpHeader">
<metadata name="net.sf.eclipsecs.core.comment" value="Checks that the file starts with a yahoo/apache copyright block."/>
<property name="severity" value="error"/>
<property name="headerFile" value="xml.header"/>
<property name="fileExtensions" value="xml"/>
</module>
<module name="FileTabCharacter">
<metadata name="net.sf.eclipsecs.core.comment" value="Enforce no tabs, only spaces for indent."/>
<property name="severity" value="error"/>
<property name="eachLine" value="true"/>
</module>
<module name="NewlineAtEndOfFile">
<metadata name="net.sf.eclipsecs.core.comment" value="Enforce newline at end of file."/>
<property name="severity" value="error"/>
<property name="lineSeparator" value="lf"/>
</module>
<module name="RegexpMultiline">
<metadata name="net.sf.eclipsecs.core.comment" value="Excessive white space"/>
<property name="severity" value="error"/>
<property name="format" value="^\n\n\n"/>
<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="^\n\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="\}\n\n\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>