-
Notifications
You must be signed in to change notification settings - Fork 78
/
checkstyle.xml
137 lines (136 loc) · 7.15 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
<?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">
<module name="TreeWalker">
<module name="AvoidStarImport"/>
<module name="AvoidStaticImport"/>
<module name="ConstantName"/>
<module name="DeclarationOrder"/>
<module name="EqualsHashCode"/>
<module name="FallThrough"/>
<module name="FinalLocalVariable"/>
<module name="FinalParameters"/>
<module name="Regexp">
<property name="format" value="[ \t]+$"/>
<property name="illegalPattern" value="true"/>
<property name="message" value="Trailing whitespace"/>
</module>
<module name="Regexp">
<property name="format" value="System\.out\.println"/>
<property name="illegalPattern" value="true"/>
<property name="ignoreComments" value="true"/>
</module>
<module name="HiddenField">
<property name="ignoreConstructorParameter" value="true"/>
<property name="ignoreSetter" value="true"/>
</module>
<module name="HideUtilityClassConstructor"/>
<module name="IllegalCatch"/>
<module name="IllegalImport"/>
<module name="Indentation">
<property name="basicOffset" value="4"/>
<property name="caseIndent" value="4"/>
</module>
<module name="JavadocMethod">
<property name="validateThrows" value="false"/>
</module>
<module name="JavadocStyle"/>
<module name="JavadocVariable"/>
<module name="MissingSwitchDefault"/>
<module name="ModifierOrder"/>
<module name="MultipleStringLiterals">
<property name="ignoreStringsRegexp" value='^(("")|(".")|("\\\\"))$'/>
</module>
<module name="MultipleVariableDeclarations"/>
<module name="NoWhitespaceAfter">
<property name="tokens"
value="AT, INC, DEC, UNARY_MINUS, UNARY_PLUS, BNOT, LNOT, DOT,
ARRAY_DECLARATOR, INDEX_OP"/>
</module>
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap">
<property name="option" value="eol"/>
</module>
<module name="RedundantModifier"/>
<module name="StringLiteralEquality"/>
<module name="TodoComment">
<property name="severity" value="warning"/>
</module>
<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, LAND,
LOR, LITERAL_INSTANCEOF, GT, LT, GE, LE, EQUAL, NOT_EQUAL, UNARY_MINUS,
UNARY_PLUS, INC, DEC, LNOT, BNOT, POST_INC, POST_DEC"/>
</module>
<module name="NeedBraces"/>
<module name="UnusedImports"/>
<module name="VisibilityModifier"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround">
<property name="tokens"
value="ASSIGN, ARRAY_INIT, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN,
BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT,
LAND, LCURLY, LE, 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"/>
</module>
<!-- Avoid Python keywords in method, class, interface and enum names -->
<module name="IllegalIdentifierName">
<property name="format"
value="(?i)^(?!(del|elif|except|from|global|in|is|lambda|nonlocal|not|or|pass|raise|with|yield)$).+$"/>
<property name="tokens" value="CLASS_DEF, INTERFACE_DEF, METHOD_DEF, ENUM_DEF"/>
<message key="name.invalidPattern" value="Name ''{0}'' is not allowed."/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop ConstantName"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume ConstantName"/>
<property name="checkFormat" value="ConstantName"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop JavadocVariable check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume JavadocVariable check"/>
<property name="checkFormat" value="JavadocVariable"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop VisibilityModifier check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume VisibilityModifier check"/>
<property name="checkFormat" value="VisibilityModifierCheck"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop NoWhitespaceAfter check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume NoWhitespaceAfter check"/>
<property name="checkFormat" value="NoWhitespaceAfter"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop Indentation check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume Indentation check"/>
<property name="checkFormat" value="IndentationCheck"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop MultipleStringLiterals check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume MultipleStringLiterals check"/>
<property name="checkFormat" value="MultipleStringLiteralsCheck"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CHECKSTYLE\: stop IllegalCatch check"/>
<property name="onCommentFormat" value="CHECKSTYLE\: resume IllegalCatch check"/>
<property name="checkFormat" value="IllegalCatchCheck"/>
</module>
</module>
<module name="RegexpHeader">
<property name="headerFile" value="${checkstyle.header.file}" />
<property name="fileExtensions" value="java" />
</module>
<module name="FileTabCharacter"/>
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="LF_CR_CRLF"/>
</module>
</module>