-
Notifications
You must be signed in to change notification settings - Fork 12
/
checkstyle.xml
155 lines (140 loc) · 5.87 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
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<module name="TreeWalker">
<module name="MissingOverride"/>
<module name="PackageAnnotation"/>
<module name="SuppressWarnings"/>
<module name="SuppressWarningsHolder"/>
<!-- Blocks -->
<module name="EmptyBlock">
<property name="option" value="text"/>
</module>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="RightCurly"/>
<!-- Class Design -->
<module name="MutableException"/>
<module name="OneTopLevelClass"/>
<module name="ThrowsCount">
<property name="max" value="3"/>
</module>
<!-- Coding -->
<module name="CovariantEquals"/>
<module name="DefaultComesLast">
<property name="skipIfLastAndSharedWithCase" value="true"/>
</module>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="FallThrough"/>
<module name="IllegalInstantiation">
<property name="classes" value="java.lang.Boolean, java.lang.Integer, java.lang.Long, java.lang.Short, java.lang.Byte, java.lang.Double, java.lang.Float, java.lang.Character"/>
</module>
<!-- Forbid goto -->
<module name="IllegalToken"/>
<module name="IllegalTokenText">
<property name="tokens" value="NUM_INT,NUM_LONG"/>
<property name="format" value="^0[^lx]"/>
<property name="ignoreCase" value="true"/>
<property name="message" value="Avoid using octal numbers"/>
</module>
<module name="ModifiedControlVariable"/>
<module name="MultipleVariableDeclarations"/>
<module name="NestedTryDepth">
<property name="max" value="2"/>
</module>
<module name="NoFinalizer"/>
<module name="OneStatementPerLine"/>
<module name="PackageDeclaration"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
<module name="SuperFinalize"/>
<!-- Imports -->
<module name="AvoidStarImport"/>
<!-- IDEA style -->
<module name="CustomImportOrder">
<property name="customImportOrderRules"
value="THIRD_PARTY_PACKAGE###SPECIAL_IMPORTS###STANDARD_JAVA_PACKAGE###STATIC"/>
<property name="specialImportsRegExp" value="^javax\."/>
<property name="standardPackageRegExp" value="^java\."/>
<property name="sortImportsInGroupAlphabetically" value="true"/>
<property name="separateLineBetweenGroups" value="false"/>
</module>
<module name="RedundantImport"/>
<module name="UnusedImports">
<property name="processJavadoc" value="true"/>
</module>
<!-- Miscellaneous -->
<module name="ArrayTypeStyle"/>
<module name="OuterTypeFilename"/>
<module name="UpperEll"/>
<!-- Naming Conventions -->
<module name="CatchParameterName"/>
<module name="InterfaceTypeParameterName">
<property name="format" value="^[A-Z0-9_]+$"/>
</module>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="PackageName"/>
<module name="ParameterName">
<property name="format" value="^__?|[a-z][a-zA-Z0-9]*$"/>
</module>
<module name="TypeName"/>
<!-- Size Violations -->
<module name="MethodCount"/>
<module name="MethodLength"/>
<module name="OuterTypeNumber"/>
<!-- Whitespace -->
<module name="EmptyForInitializerPad"/>
<module name="EmptyForIteratorPad"/>
<module name="MethodParamPad">
<property name="option" value="nospace"/>
</module>
<module name="GenericWhitespace"/>
<module name="NoLineWrap"/>
<module name="NoWhitespaceAfter">
<property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS"/>
</module>
<module name="NoWhitespaceBefore">
<property name="allowLineBreaks" value="true"/>
</module>
<module name="ParenPad"/>
<module name="SeparatorWrap">
<property name="tokens" value="COMMA"/>
<property name="option" value="eol"/>
</module>
<module name="SeparatorWrap">
<property name="tokens" value="DOT"/>
<property name="option" value="nl"/>
</module>
<module name="SingleSpaceSeparator"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyLambdas" value="true"/>
<property name="allowEmptyMethods" value="true"/>
<property name="allowEmptyTypes" value="true"/>
</module>
</module>
<!-- The tab character is forbidden in the source files -->
<module name="FileTabCharacter">
<property name="eachLine" value="false"/>
</module>
<module name="NewlineAtEndOfFile"/>
<!-- Uses annotations to suppress audit events -->
<module name="SuppressWarningsFilter"/>
<!-- Detects duplicated keys in properties files -->
<module name="UniqueProperties"/>
<!-- Suppressions -->
<module name="SuppressionFilter">
<property name="file" value="${checkstyle.suppressions.file}" default=""/>
</module>
<!-- Generated files -->
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern"
value="(Bad|Trail)Events\.java$"/>
</module>
</module>