forked from apache/jmeter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkstyle.xml
198 lines (177 loc) · 7.28 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
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="localeLanguage" value="en"/>
<property name="charset" value="UTF-8"/>
<property name="severity" value="error"/>
<property name="fileExtensions"
value="java, groovy, xml, xsd, dtd, htm, html, txt, properties"/>
<!-- Verify that EVERY source file has the appropriate license -->
<module name="RegexpHeader">
<property name="headerFile" value="java.header.regex"/>
<property name="multiLines" value="10"/>
<property name="fileExtensions" value="java, groovy"/>
</module>
<!-- Miscellaneous -->
<module name="FileTabCharacter">
<!-- No tabs allowed! -->
<property name="fileExtensions" value="java, groovy, xml, xsd, dtd, htm, html, txt, properties"/>
</module>
<module name="NewlineAtEndOfFile"/>
<module name="RegexpMultiline">
<!-- No more than 2 blank lines allowed. -->
<property name="format" value="\r?\n[\t ]*\r?\n[\t ]*\r?\n[\t ]*\r?\n"/>
<property name="fileExtensions" value="java, groovy, xml, properties"/>
<property name="message" value="Unnecessary consecutive lines"/>
</module>
<!--<module name="RegexpOnFilename">-->
<!--<property name="folderPattern" value="[\\/]src[\\/]\w+[\\/]java[\\/]"/>-->
<!--<property name="fileNamePattern" value="\.java$"/>-->
<!--<property name="match" value="false"/>-->
<!--<message key="regexp.filepath.mismatch" value="Only java files should be located in the ''src/*/java'' folders."/>-->
<!--</module>-->
<module name="UniqueProperties">
<property name="fileExtensions" value="properties"/>
</module>
<!-- Size Violations -->
<module name="FileLength">
<property name="fileExtensions" value="java, groovy"/>
</module>
<module name="TreeWalker">
<!-- Annotations -->
<!--<module name="MissingDeprecated"/>-->
<module name="MissingOverride"/>
<!-- Block checks -->
<module name="AvoidNestedBlocks"/>
<module name="EmptyBlock"/>
<module name="EmptyCatchBlock">
<property name="exceptionVariableName" value="expected|ignore"/>
</module>
<!--<module name="LeftCurly"/>-->
<!--<module name="RightCurly"/>-->
<module name="NeedBraces"/>
<!--Class Design-->
<!--<module name="FinalClass"/>-->
<!--<module name="HideUtilityClassConstructor"/>--> <!--need to change 25 class APIs-->
<module name="InterfaceIsType"/> <!-- Interfaces must be types (not just constants) -->
<module name="MutableException"/>
<module name="OneTopLevelClass"/>
<module name="ThrowsCount">
<property name="max" value="5"/>
<property name="ignorePrivateMethods" value="false"/>
</module>
<!-- Coding -->
<module name="CovariantEquals"/>
<!-- Require hash code override when equals is -->
<module name="EqualsHashCode"/>
<module name="IllegalInstantiation">
<property name="classes" value="java.lang.Boolean"/>
</module>
<module name="IllegalThrows"/>
<module name="MissingSwitchDefault"/>
<module name="ModifiedControlVariable"/>
<module name="MultipleVariableDeclarations"/>
<module name="NestedForDepth"/>
<module name="NestedIfDepth">
<!-- TODO: reduce this number -->
<property name="max" value="4"/>
</module>
<module name="NestedTryDepth">
<property name="max" value="2"/>
</module>
<module name="OneStatementPerLine"/>
<!--<module name="ParameterAssignment"/>-->
<module name="ReturnCount">
<!-- TODO: reduce these numbers -->
<property name="max" value="9" />
<property name="maxForVoid" value="9"/>
</module>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
<module name="SuperFinalize"/>
<module name="UnnecessaryParentheses"/>
<!--<module name="VariableDeclarationUsageDistance"/>-->
<!-- Imports -->
<module name="AvoidStarImport">
<property name="allowClassImports" value="false"/>
<property name="allowStaticMemberImports" value="false"/>
</module>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="ImportOrder">
<property name="groups" value="/^java\./,javax,org,net,com"/>
<property name="ordered" value="true"/>
<property name="separated" value="true"/>
<property name="option" value="top"/>
<property name="sortStaticImportsAlphabetically" value="true"/>
</module>
<!-- JavaDocs -->
<!--
<module name="JavadocMethod">
<property name="minLineCount" value="3"/>
<property name="scope" value="protected"/>
<property name="allowUndeclaredRTE" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowMissingPropertyJavadoc" value="true"/>
<property name="ignoreMethodNamesRegex" value="(get|set|is).*"/>
<!– Only check methods, i.e. ignore constructors –>
<property name="tokens" value="METHOD_DEF"/>
</module>
-->
<!--<module name="NonEmptyAtclauseDescription"/>-->
<!-- Misc -->
<module name="ArrayTypeStyle"/>
<module name="AvoidEscapedUnicodeCharacters"/>
<!--<module name="CommentsIndentation"/>-->
<module name="OuterTypeFilename"/>
<module name="UpperEll"/>
<!-- code metrics -->
<!--<module name="BooleanExpressionComplexity"/>-->
<!--<module name="ClassFanOutComplexity"/>-->
<!--<module name="CyclomaticComplexity"/>-->
<!--<module name="NPathComplexity"/>-->
<!-- size -->
<module name="AnonInnerLength">
<property name="max" value="45"/>
</module>
<module name="LineLength">
<!-- TODO: reduce this to 120 -->
<property name="max" value="160"/>
</module>
<!-- whitespace -->
<module name="EmptyForInitializerPad"/>
<module name="EmptyForIteratorPad"/>
<module name="MethodParamPad"/>
<module name="NoLineWrap"/>
<module name="TypecastParenPad"/>
<!--
Allow comment to suppress checkstyle for a single line
e.g. // CHECKSTYLE IGNORE MagicNumber
-->
<module name="SuppressWithNearbyCommentFilter">
<property name="commentFormat" value="CHECKSTYLE IGNORE (\w+)"/>
<property name="checkFormat" value="$1"/>
</module>
</module>
<module name="SuppressionFilter">
<!-- config_loc is used by Eclipse plugin -->
<property name="file" value="${config_loc}/checkstyle-suppressions.xml"/>
</module>
</module>