-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcheck-style.xml
80 lines (63 loc) · 3.13 KB
/
check-style.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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<!-- Long source files become very hard to understand. Make sure files don't exceed the maximum number of lines. -->
<module name="FileLength">
<property name="max" value="1500"/>
<property name="fileExtensions" value="java"/>
</module>
<module name="TreeWalker">
<module name="SuppressionCommentFilter"/>
<!--module name="RegexpSinglelineJava">
<property name="format" value="^\t* "/>
<property name="message" value="Indent must use tab characters"/>
<property name="ignoreComments" value="true"/>
</module-->
<!-- Long lines are hard to read. Make sure lines don't exceed the maximum line length. -->
<module name="LineLength">
<property name="max" value="180"/>
</module>
<!-- Avoid trailing spaces at the end of a line. -->
<module name="RegexpSinglelineJava">
<!-- \s matches whitespace character, $ matches end of line. -->
<property name="format" value="\s+$"/>
<property name="ignoreComments" value="true"/>
<property name="message" value="Line has trailing spaces at the end"/>
</module>
<!-- Limit the amount of parameters for one method. -->
<module name="ParameterNumber">
<property name="max" value="8"/>
</module>
<!-- Avoid redundant or unused imports. -->
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<!-- Don't allow to import sun.* packages. -->
<module name="IllegalImport">
<property name="illegalClasses" value="org.jetbrains.annotations.NotNull"/>
</module>
<!-- Classes that override equals also override hashCode. -->
<module name="EqualsHashCode"/>
<!-- Checks for overly complicated boolean return statements or expressions. -->
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<!-- Checks that string literals are not used with == or !=. -->
<module name="StringLiteralEquality"/>
<!-- Avoid excessive nesting. -->
<module name="NestedForDepth"/>
<module name="NestedIfDepth">
<property name="max" value="2"/>
</module>
<module name="NestedTryDepth"/>
<!-- Checks there is only one statement per line. The following line will be flagged as an error. -->
<module name="OneStatementPerLine"/>
<!-- Detects empty statements. -->
<module name="EmptyStatement"/>
<!-- Checks for illegal instantiations where a factory method is preferred. E.g. new Boolean(...). -->
<module name="IllegalInstantiation"/>
<!-- Checks that the parts of a class or interface declaration appear in the order suggested by the Code
Conventions for the Java Programming Language. -->
<!--module name="DeclarationOrder" /-->
</module>
</module>