-
Notifications
You must be signed in to change notification settings - Fork 181
/
checkstyle.xml
188 lines (184 loc) · 8.34 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
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="fileExtensions" value="java, properties, xml"/>
<module name="NewlineAtEndOfFile"/>
<module name="Translation"/>
<module name="FileLength">
<property name="max" value="2024"/>
</module>
<module name="FileTabCharacter"/>
<module name="RegexpSingleline">
<property name="format" value="\s+$"/>
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
<property name="message" value="Line has trailing spaces."/>
</module>
<module name="RegexpMultiline">
<property name="format" value="^([^\n ]+ )*(class|interface|enum) [^{]*\{\n[^\n}]"/>
<property name="message" value="Leave empty row after class/interface/enum definition!"/>
<property name="severity" value="error"/>
<property name="fileExtensions" value="groovy,java"/>
</module>
<module name="RegexpMultiline">
<property name="format" value="System\.(out|err)\.print"/>
</module>
<module name="LineLength">
<property name="max" value="120"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|@see|//"/>
</module>
<module name="SuppressWarningsFilter"/>
<module name="TreeWalker">
<module name="Indentation">
<property name="lineWrappingIndentation" value="8"/>
<property name="arrayInitIndent" value="8"/>
<property name="forceStrictCondition" value="false"/>
</module>
<module name="EmptyLineSeparator">
<property name="allowNoEmptyLineBetweenFields" value="true"/>
<property name="allowMultipleEmptyLines" value="false"/>
<property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
</module>
<module name="NoLineWrap"/>
<module name="NeedBraces"/>
<module name="ConstantName">
<property name="format" value="^([A-Z][A-Z0-9]*(_[A-Z0-9]+)*|(.*?)[l,L]ogger)$"/>
</module>
<module name="FinalLocalVariable">
<property name="tokens" value="VARIABLE_DEF"/>
</module>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="MultipleVariableDeclarations"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<module name="AvoidStarImport"/>
<module name="AvoidStaticImport"/>
<module name="IllegalImport">
<!-- Avoids shaded imports if IDE autosuggests them. Avoid lang in favor of lang3. -->
<property name="illegalPkgs" value="
autovalue.shaded.com.google,
org.inferred.freebuilder.shaded.com.google,
org.apache.commons.lang"/>
<property name="illegalClasses" value="org.junit.Test" />
</module>
<module name="RedundantImport"/>
<module name="UnusedImports">
<property name="processJavadoc" value="true"/>
</module>
<module name="ImportOrder">
<property name="option" value="bottom"/>
<property name="groups" value="*,/^java|^jakarta/"/>
<property name="ordered" value="false"/>
<property name="separated" value="true"/>
<property name="caseSensitive" value="true"/>
<property name="sortStaticImportsAlphabetically" value="true"/>
<property name="useContainerOrderingForStatic" value="false"/>
</module>
<module name="MethodLength"/>
<module name="EmptyForIteratorPad">
<property name="option" value="space"/>
</module>
<module name="GenericWhitespace"/>
<module name="MethodParamPad">
<property name="allowLineBreaks" value="false"/>
</module>
<module name="NoWhitespaceAfter">
<property name="tokens" value="INC,DEC,UNARY_MINUS,UNARY_PLUS,BNOT,LNOT,DOT,ARRAY_DECLARATOR,INDEX_OP"/>
<property name="allowLineBreaks" value="true"/>
</module>
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap"/>
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround"/>
<module name="AnnotationLocation">
<property name="allowSamelineMultipleAnnotations" value="false"/>
<property name="allowSamelineSingleParameterlessAnnotation" value="false"/>
</module>
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<module name="AvoidNestedBlocks"/>
<module name="EmptyBlock"/>
<module name="LeftCurly"/>
<module name="RightCurly"/>
<module name="RightCurly">
<property name="option" value="alone"/>
<property name="tokens" value="METHOD_DEF"/>
</module>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<module name="MissingOverride"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="HideUtilityClassConstructor"/>
<module name="ArrayTypeStyle"/>
<module name="CommentsIndentation"/>
<module name="UpperEll"/>
<module name="IllegalThrows"/>
<module name="OneStatementPerLine"/>
<module name="OuterTypeFilename"/>
<module name="OverloadMethodsDeclarationOrder"/>
<module name="SeparatorWrap">
<property name="option" value="nl"/>
<property name="tokens" value="DOT"/>
</module>
<module name="SeparatorWrap">
<property name="option" value="eol"/>
<property name="tokens" value="COMMA"/>
</module>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="SingleSpaceSeparator"/>
<module name="StringLiteralEquality"/>
<module name="UnnecessaryParentheses">
<property name="tokens" value="
EXPR, IDENT,
NUM_DOUBLE, NUM_FLOAT, NUM_INT, NUM_LONG,
STRING_LITERAL, LITERAL_NULL, LITERAL_FALSE, LITERAL_TRUE,
ASSIGN, BAND_ASSIGN, BOR_ASSIGN, BSR_ASSIGN, BXOR_ASSIGN,
DIV_ASSIGN, MINUS_ASSIGN, MOD_ASSIGN, PLUS_ASSIGN,
SL_ASSIGN, SR_ASSIGN, STAR_ASSIGN, LAMBDA,
TEXT_BLOCK_LITERAL_BEGIN,
LITERAL_INSTANCEOF,
GT, LT, GE, LE, EQUAL, NOT_EQUAL,
UNARY_MINUS, UNARY_PLUS, INC, DEC, LNOT, BNOT, POST_INC, POST_DEC"/>
<!-- All default values are present except LAND, LOR.-->
</module>
<module name="SuppressWarningsHolder"/>
<!--
TODO schernysh 11.21.2019:
Ban usage of Vert.x Json object as it's being deprecated since Vert.x 3.8 branch.
This enforcement could be removed in a while when everyone feels comfortable without Json.
Suggested date of removal: 02.01.2020
Enforced by:
- "IllegalImport" just below
- "SuppressionSingleFilter" targeted at "BanVertxJsonImport" in the outer module
-->
<module name="IllegalImport">
<property name="id" value="BanVertxJsonImport"/>
<property name="illegalClasses" value="io.vertx.core.json.Json"/>
</module>
</module>
<module name="SuppressionSingleFilter">
<property name="id" value="BanVertxJsonImport"/>
<property name="files" value="src/main/java/org/prebid/server/json/ObjectMapperProvider\.java"/>
</module>
<module name="SuppressionSingleFilter">
<property name="checks" value="AvoidStaticImport"/>
<property name="files" value=".*Test\.java"/>
</module>
<module name="SuppressionSingleFilter">
<property name="checks" value="FileLength"/>
<property name="files" value=".*Test\.java"/>
</module>
</module>