-
Notifications
You must be signed in to change notification settings - Fork 165
/
checkstyle.xml
132 lines (123 loc) · 6.02 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
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="severity" value="error"/>
<property name="charset" value="UTF-8"/>
<module name="TreeWalker">
<module name="AbstractClassName"/>
<module name="AvoidStarImport"/>
<module name="CatchParameterName"/>
<module name="ClassTypeParameterName"/>
<module name="ConstantName"/>
<module name="InterfaceTypeParameterName"/>
<module name="LambdaParameterName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="MethodTypeParameterName"/>
<module name="ParameterName"/>
<module name="OneTopLevelClass"/>
<module name="AnnotationLocation">
<property name="allowSamelineMultipleAnnotations" value="false"/>
<property name="allowSamelineSingleParameterlessAnnotation" value="false"/>
<property name="allowSamelineParameterizedAnnotation" value="false"/>
</module>
<module name="EmptyCatchBlock">
<property name="commentFormat"
value="Ignored"/>
</module>
<module name="NeedBraces"/>
<module name="LeftCurly">
<property name="ignoreEnums" value="false"/>
</module>
<module name="RightCurly">
<property name="option" value="alone"/>
<property name="tokens"
value="LITERAL_ELSE, METHOD_DEF, CTOR_DEF, COMPACT_CTOR_DEF,
LITERAL_FOR, LITERAL_WHILE"/>
</module>
<module name="RightCurly">
<property name="option" value="same"/>
<property name="tokens" value="LITERAL_TRY, LITERAL_CATCH,
LITERAL_FINALLY, LITERAL_IF, LITERAL_DO"/>
</module>
<module name="ThrowsCount">
<property name="max" value="2"/>
<property name="ignorePrivateMethods" value="false"/>
</module>
<module name="VisibilityModifier"/>
<module name="DeclarationOrder"/>
<module name="IllegalType">
<property name="illegalClassNames"
value="HashMap, HashSet, LinkedHashMap, LinkedHashSet,
TreeMap, TreeSet, Hashtable, ArrayList, LinkedList, Vector,
java.util.HashMap, java.util.HashSet, java.util.LinkedHashMap,
java.util.LinkedHashSet, java.util.TreeMap, java.util.TreeSet,
java.util.Hashtable, java.util.ArrayList, java.util.LinkedList,
java.util.Vector
"/>
</module>
<module name="MultipleVariableDeclarations"/>
<module name="OneStatementPerLine"/>
<module name="UnusedImports"/>
<module name="EmptyLineSeparator"/>
<module name="NestedForDepth"/>
<module name="NestedIfDepth"/>
<module name="NestedTryDepth"/>
<module name="MethodLength">
<property name="max" value="25"/>
</module>
<module name="OuterTypeNumber"/>
<module name="ParameterNumber">
<property name="max" value="5"/>
</module>
<module name="BooleanExpressionComplexity">
<property name="max" value="4"/>
</module>
<module name="ClassDataAbstractionCoupling">
<property name="max" value="17"/>
</module>
<module name="CyclomaticComplexity">
<property name="max" value="17"/>
</module>
<module name="NPathComplexity"/>
<module name="JavaNCSS">
<property name="methodMaximum" value="25"/>
<property name="classMaximum" value="800"/>
</module>
<module name="MatchXpath">
<property name="query" value="//CLASS_DEF[./IDENT[not(contains(@text, 'Config')) and not(ends-with(@text, 'Test'))]]
/OBJBLOCK/VARIABLE_DEF/MODIFIERS/ANNOTATION/IDENT[@text='Autowired']"/>
<message key="matchxpath.match"
value="Внедрение должно осуществляться через конструктор"/>
</module>
<module name="MatchXpath">
<property name="query" value="//CLASS_DEF[./IDENT[not(contains(@text, 'Config')) and not(ends-with(@text, 'Test'))]]
/OBJBLOCK/METHOD_DEF/MODIFIERS/ANNOTATION/IDENT[@text='Autowired']"/>
<message key="matchxpath.match"
value="Внедрение должно осуществляться через конструктор"/>
</module>
<module name="MatchXpath">
<property name="query" value="//CLASS_DEF/OBJBLOCK/METHOD_DEF//SLIST[count(ancestor::SLIST) >= 4]"/>
<message key="matchxpath.match"
value="Большая вложенность блоков в методе, максимум 5"/>
</module>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyMethods" value="true"/>
<property name="allowEmptyTypes" value="true"/>
<property name="allowEmptyLoops" value="true"/>
<message key="ws.notPreceded" value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
<message key="ws.notFollowed"
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
</module>
<module name="ModifierOrder"/>
<module name="ParenPad"/>
</module>
<module name="LineLength">
<property name="fileExtensions" value="java"/>
<property name="max" value="121"/>
</module>
</module>