forked from eclipse-collections/eclipse-collections
-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkstyle-configuration.xml
290 lines (213 loc) · 10 KB
/
checkstyle-configuration.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
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<!--
~ Copyright (c) 2016 Goldman Sachs.
~ All rights reserved. This program and the accompanying materials
~ are made available under the terms of the Eclipse Public License v1.0
~ and Eclipse Distribution License v. 1.0 which accompany this distribution.
~ The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
~ and the Eclipse Distribution License is available at
~ http://www.eclipse.org/org/documents/edl-v10.php.
-->
<!-- Checkstyle is very configurable. Be sure to read the documentation at -->
<!-- http://checkstyle.sf.net (or in your downloaded distribution). -->
<!-- Most Checks are configurable, be sure to consult the documentation. -->
<!-- To completely disable a check, just comment it out or delete it from the file. -->
<module name="Checker">
<module name="SuppressionFilter">
<property name="file" value="checkstyle-suppressions.xml" />
</module>
<property name="severity" value="error" />
<!-- Checks whether files end with a new line. -->
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="lf" />
<property name="fileExtensions" value="java, xml, stg, scala" />
</module>
<module name="TreeWalker">
<property name="tabWidth" value="4" />
<module name="RequireThis">
<property name="checkFields" value="false" />
</module>
<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
<module name="ConstantName" />
<module name="LocalFinalVariableName" />
<module name="LocalVariableName" />
<module name="MemberName" />
<module name="MethodName">
<property name="format" value="^[a-z][a-zA-Z0-9_]*$" />
</module>
<module name="MethodTypeParameterName">
<property name="format" value="^[A-Z0-9]+$" />
</module>
<module name="PackageName">
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$" />
</module>
<module name="ParameterName" />
<module name="StaticVariableName" />
<module name="TypeName" />
<module name="AvoidStarImport">
<property name="allowStaticMemberImports" value="true" />
</module>
<module name="IllegalImport" />
<module name="RedundantImport" />
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="EmptyForIteratorPad">
<property name="option" value="space" />
</module>
<module name="MethodParamPad" />
<module name="NoWhitespaceAfter">
<property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS" />
</module>
<module name="NoWhitespaceBefore" />
<module name="OperatorWrap" />
<module name="ParenPad" />
<module name="TypecastParenPad" />
<module name="WhitespaceAfter" />
<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" />
</module>
<module name="EmptyLineSeparator">
<property name="allowNoEmptyLineBetweenFields" value="true" />
</module>
<module name="SeparatorWrap">
<property name="tokens" value="DOT" />
<property name="option" value="nl" />
</module>
<module name="SeparatorWrap">
<property name="tokens" value="COMMA" />
<property name="option" value="EOL" />
</module>
<!-- Modifier Checks -->
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
<module name="ModifierOrder" />
<module name="RedundantModifier" />
<module name="LeftCurly">
<property name="option" value="nl" />
</module>
<module name="NeedBraces" />
<module name="RightCurly">
<property name="option" value="alone" />
</module>
<!-- Checks for common coding problems -->
<!-- See http://checkstyle.sf.net/config_coding.html -->
<module name="EmptyStatement" />
<!-- Effective Java Item 8 - Always override hashCode when you override equals -->
<module name="EqualsHashCode" />
<!--<module name="HiddenField">-->
<!--<property name="severity" value="warning" />-->
<!--<property name="ignoreSetter" value="true" />-->
<!--<property name="ignoreConstructorParameter" value="true" />-->
<!--</module>-->
<!-- Effective Java Item 4 - Avoid creating duplicate objects -->
<module name="IllegalInstantiation">
<property name="severity" value="warning" />
<property
name="classes"
value="java.lang.Boolean,java.lang.Integer,java.lang.Long,java.lang.Short,java.lang.Character,java.lang.Byte,java.util.Timer,java.util.TimerTask" />
</module>
<module name="SimplifyBooleanExpression" />
<module name="SimplifyBooleanReturn" />
<module name="FinalClass" />
<module name="HideUtilityClassConstructor" />
<!-- Effective Java Item 17 - Use interfaces only to define types -->
<module name="InterfaceIsType">
<property name="severity" value="warning" />
</module>
<!-- Miscellaneous other checks. -->
<!-- See http://checkstyle.sf.net/config_misc.html -->
<module name="ArrayTypeStyle" />
<module name="Regexp">
<property name="illegalPattern" value="true" />
<property name="format" value="[’“”]" />
<property name="message" value="Curly quotes aren't allowed." />
</module>
<module name="Regexp">
<property name="illegalPattern" value="true" />
<property name="format" value="[ ]+$" />
<property name="message" value="Line has trailing spaces." />
</module>
<module name="Regexp">
<property name="illegalPattern" value="true" />
<property
name="format"
value="System\.out\.println" />
<property
name="message"
value="System.out.println." />
</module>
<module name="Regexp">
<property name="illegalPattern" value="true" />
<property
name="format"
value="System\.err\.println" />
<property
name="message"
value="System.err.println." />
</module>
<!-- Effective Java Item 6 - Avoid finalizers -->
<module name="NoFinalizer" />
<module name="GenericWhitespace" />
<module name="IllegalThrows" />
<module name="UpperEll" />
<module name="SuperFinalize" />
<module name="SuperClone">
<property name="severity" value="warning" />
</module>
<module name="CovariantEquals" />
<module name="AvoidStaticImport">
<property name="excludes"
value="org.junit.Assert.*,org.hamcrest.CoreMatchers.*,org.hamcrest.Matchers.*,org.eclipse.collections.impl.test.Verify.*,org.eclipse.collections.impl.factory.Iterables.*,org.eclipse.collections.test.IterableTestCase.*" />
</module>
<module name="MissingDeprecated" />
<module name="AnnotationUseStyle" />
<module name="DeclarationOrder" />
<module name="DefaultComesLast" />
<module name="FallThrough" />
<module name="ImportOrder">
<property name="groups" value="java,javax" />
<property name="separated" value="true" />
</module>
<module name="MultipleVariableDeclarations" />
<module name="MutableException" />
<module name="PackageDeclaration" />
<module name="MissingOverride">
<property name="javaFiveCompatibility" value="true" />
</module>
<module name="OneTopLevelClass" />
<module name="NoLineWrap" />
<module name="UnusedImports">
<property name="processJavadoc" value="true" />
</module>
<!-- Comment until the check handles lambda expression with throw statement. -->
<!-- <module name="OneStatementPerLine" /> -->
</module>
<module name="RegexpHeader">
<property name="headerFile" value="java.header" />
<property name="multiLines" value="11, 12, 13, 15, 16" />
<property name="fileExtensions" value="java, scala" />
</module>
<module name="FileTabCharacter" />
<module name="RegexpMultiline">
<property name="format" value="\{\n\n" />
<property name="message" value="First line after opening a scope may not be blank." />
</module>
<module name="RegexpMultiline">
<property name="format" value="\n\n[ ]*\}" />
<property name="message" value="Last line before closing a scope may not be blank." />
</module>
<module name="RegexpMultiline">
<property name="format" value="\n\n\n" />
<property name="message" value="Extra newline." />
</module>
<module name="RegexpMultiline">
<property name="format" value="\r" />
<property name="message" value="Carriage return." />
</module>
</module>