-
Notifications
You must be signed in to change notification settings - Fork 0
/
vmtstyle.xml
249 lines (219 loc) · 10.2 KB
/
vmtstyle.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
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<!--
<module name="RegexpHeader">
<property name="header" value="^/\*\*\n \* \(C\) VMTurbo 2016.\n \*/$"/>
<property name="fileExtensions" value="java, c, cpp, h"/>
</module>
-->
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="FileTabCharacter">
<property name="fileExtensions" value="java, xml, xslt, cpp, c, h"/>
</module>
<module name="NewlineAtEndOfFile">
<property name="fileExtensions" value="java, sql, properties, css, cpp, c, h"/>
</module>
<module name="RegexpSingleline">
<!-- \s matches whitespace character, $ matches end of line. -->
<property name="message" value="Line has trailing whitespace"/>
<property name="format" value="\s+$"/>
<property name="fileExtensions" value="xml, sql, css, cpp, c, h"/>
</module>
<module name="RegexpSingleline">
<!-- \s matches whitespace character, $ matches end of line. -->
<property name="message" value="Redundant space before equal sign"/>
<property name="format" value="^\w+\s="/>
<property name="fileExtensions" value="properties"/>
</module>
<module name="RegexpSingleline">
<!-- \s matches whitespace character, $ matches end of line. -->
<property name="message" value="Redundant space after equal sign"/>
<property name="format" value="^\w+=\s"/>
<property name="fileExtensions" value="properties"/>
</module>
<module name="RegexpSingleline">
<property name="message" value="Line has non-ASCII symbols"/>
<property name="format" value="[^\p{ASCII}]"/>
<property name="fileExtensions" value="properties"/>
</module>
<module name="Translation"/>
<module name="UniquePropertiesCheck">
<property name="fileExtensions" value="properties"/>
</module>
<!-- Main class walker -->
<module name="TreeWalker">
<module name="RegexpSinglelineJava">
<property name="format" value="[ \t]+$"/>
<property name="message" value="Line has trailing whitespace"/>
<property name="ignoreComments" value="true"/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="^ \* \S*( \S*)*[ \t]+$"/>
<property name="message" value="Line has trailing whitespace"/>
<property name="ignoreComments" value="false"/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="^/\*\*[ \t]+$"/>
<property name="message" value="Line has trailing whitespace"/>
<property name="ignoreComments" value="false"/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="^ \*/[ \t]+$"/>
<property name="message" value="Line has trailing whitespace"/>
<property name="ignoreComments" value="false"/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="noinspection unchecked"/>
<property name="message" value="IDEA-specific comments are not allowed"/>
<property name="ignoreComments" value="false"/>
</module>
<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<module name="JavadocMethod">
<property name="allowUndeclaredRTE" value="true"/>
<property name="allowMissingJavadoc" value="true"/>
<property name="allowMissingPropertyJavadoc" value="true"/>
</module>
<module name="JavadocType"/>
<module name="JavadocStyle">
<property name="checkEmptyJavadoc" value="true"/>
</module>
<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
<module name="ConstantName"/>
<module name="UpperEll"/>
<!-- Checks for imports -->
<!-- See http://checkstyle.sf.net/config_import.html -->
<module name="AvoidStaticImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="ImportOrder">
<property name="groups" value="/^java\./,javax,com,org,/^com\.vmturbo\./"/>
<property name="ordered" value="true"/>
<property name="separated" value="true"/>
<property name="option" value="above"/>
</module>
<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<module name="MethodLength">
<property name="max" value="50"/>
<property name="tokens" value="METHOD_DEF"/>
</module>
<module name="AnonInnerLength">
<property name="max" value="25"/>
</module>
<module name="ParameterNumber">
<property name="max" value="7"/>
<property name="tokens" value="METHOD_DEF"/>
</module>
<module name="OuterTypeNumber">
<property name="max" value="1"/>
</module>
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="GenericWhitespace"/>
<module name="WhitespaceAfter">
<!-- all except typecase -->
<property name="tokens" value="COMMA, SEMI"/>
</module>
<module name="WhitespaceAround">
<!-- all except RCURLY and SLIST -->
<property name="tokens"
value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, DO_WHILE, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, SL, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXTENSION_AND"/>
</module>
<module name="NoWhitespaceBefore"/>
<module name="NoWhitespaceAfter">
<!-- Default + TYPECAST -->
<property name="tokens"
value="ARRAY_INIT, BNOT, DEC, DOT, INC, LNOT, TYPECAST, UNARY_MINUS, UNARY_PLUS, ARRAY_DECLARATOR"/>
</module>
<module name="MethodParamPad"/>
<module name="TypecastParenPad"/>
<!-- 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"/>
<module name="LeftCurly">
</module>
<module name="RightCurly"/>
<module name="NeedBraces"/>
<!-- Checks for common coding problems -->
<!-- See http://checkstyle.sf.net/config_coding.html -->
<module name="DeclarationOrder"/>
<module name="EmptyStatement"/>
<module name="EqualsAvoidNull"/>
<module name="EqualsHashCode"/>
<module name="FinalLocalVariable">
<property name="severity" value="warning"/>
</module>
<module name="ModifiedControlVariable">
<property name="severity" value="warning"/>
</module>
<module name="MultipleStringLiterals">
<property name="severity" value="warning"/>
</module>
<module name="NestedIfDepth">
<property name="max" value="2"/>
</module>
<!-- <module name="RedundantThrows">
<property name="suppressLoadErrors" value="true"/>
</module> -->
<module name="HideUtilityClassConstructor"/>
<module name="CyclomaticComplexity">
<message key="cyclomaticComplexity"
value="Method is too complex - there are more than 20 control flow elements (if, case, ..)"/>
<property name="max" value="20"/>
</module>
<module name="InnerTypeLast"/>
<module name="MissingOverride"/>
<module name="VisibilityModifier"/>
<!--
<module name="TodoComment"/>
-->
<!--
<module name="Indentation"/>
-->
<module name="TrailingComment"/>
<module name="RegexpSinglelineJava">
<property name="format" value="noinspection unchecked"/>
<property name="message" value="IDEA-specific comments are not allowed"/>
<property name="ignoreComments" value="false"/>
</module>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
<module name="MissingDeprecated"/>
<module name="MultipleVariableDeclarations"/>
<module name="OneStatementPerLine"/>
<module name="ArrayTypeStyle"/>
<module name="DefaultComesLast"/>
<module name="IllegalThrows"/>
<module name="OuterTypeFilename"/>
<module name="ClassTypeParameterName">
<property name="format" value="^([A-Z][0-9]?)|([A-Z][a-zA-Z]+)$"/>
</module>
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="MethodTypeParameterName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<module name="EmptyLineSeparator">
<property name="allowNoEmptyLineBetweenFields" value="true"/>
</module>
<module name="NoLineWrapCheck"/>
<module name="VariableDeclarationUsageDistance"/>
<module name="OneTopLevelClass"/>
</module>
</module>