-
Notifications
You must be signed in to change notification settings - Fork 18
/
checkstyle-checker.xml
123 lines (103 loc) · 4.37 KB
/
checkstyle-checker.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
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<!--
Checkstyle configuration that checks the sun coding conventions from:
- the Java Language Specification at
http://java.sun.com/docs/books/jls/second_edition/html/index.html
- the Sun Code Conventions at http://java.sun.com/docs/codeconv/
- the Javadoc guidelines at
http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
- the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
- some best practices
Checkstyle is very configurable. Be sure to read the documentation at
http://checkstyle.sf.net (or in your downloaded distribution).
Most Checks are configurable, be sure to consult the documentation.
To completely disable a check, just comment it out or delete it from the file.
Finally, it is worth reading the documentation.
-->
<module name="Checker">
<property name="severity" value="error"/>
<module name="SuppressionFilter">
<property name="file" value="checkstyle-suppressions.xml"/>
</module>
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
<module name="FileLength">
<property name="fileExtensions" value="java"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="\s+$"/>
<property name="message" value="Trailing whitespace detected"/>
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
</module>
<module name="TreeWalker">
<property name="cacheFile" value="${checkstyle.cache.file}"/>
<property name="tabWidth" value="4"/>
<module name="AvoidStarImport"/>
<module name="EmptyForIteratorPad"/>
<module name="GenericWhitespace"/>
<module name="IllegalImport"/>
<module name="IllegalInstantiation"/>
<module name="ImportOrder"/>
<module name="LeftCurly"/>
<module name="LineLength">
<property name="max" value="160"/>
</module>
<module name="MethodLength">
<property name="max" value="200"/>
<property name="countEmpty" value="false"/>
</module>
<module name="MethodParamPad"/>
<module name="MissingDeprecated"/>
<module name="MissingOverride"/>
<module name="ModifiedControlVariable"/>
<module name="NeedBraces"/>
<module name="NestedIfDepth">
<property name="max" value="4"/>
</module>
<module name="NestedTryDepth">
<property name="max" value="3"/>
</module>
<module name="NoWhitespaceAfter">
<property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS"/>
</module>
<module name="NoWhitespaceBefore">
<property name="tokens" value="DOT"/>
<property name="allowLineBreaks" value="true"/>
</module>
<module name="OneStatementPerLine"/>
<module name="OperatorWrap">
<property name="tokens" value="ASSIGN, DIV_ASSIGN, PLUS_ASSIGN, MINUS_ASSIGN, STAR_ASSIGN, MOD_ASSIGN, SR_ASSIGN, BSR_ASSIGN, SL_ASSIGN, BXOR_ASSIGN, BOR_ASSIGN, BAND_ASSIGN"/>
<property name="option" value="eol"/>
</module>
<module name="OuterTypeFilename"/>
<module name="OuterTypeNumber"/>
<module name="PackageAnnotation"/>
<module name="PackageDeclaration"/>
<module name="PackageName"/>
<module name="ParameterNumber">
<property name="id" value="paramNum"/>
<property name="max" value="20"/>
</module>
<module name="ParenPad"/>
<module name="RedundantImport"/>
<module name="RightCurly"/>
<module name="SimplifyBooleanExpression"/>
<module name="StringLiteralEquality"/>
<module name="SuppressWarnings"/>
<module name="TypecastParenPad"/>
<module name="TypeName">
<property name="format" value="^[A-Z][a-zA-Z0-9_]*$"/>
</module>
<module name="UnusedImports"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyMethods" value="true"/>
</module>
</module>
</module>