forked from primefaces/primefaces
-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkstyle.xml
148 lines (123 loc) · 5.56 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
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<module name="FileTabCharacter"/>
<module name="LineLength">
<property name="max" value="160"/>
<property name="ignorePattern" value="@version|@see|\w*_CLASS"/>
</module>
<module name="TreeWalker">
<!-- allow usage of CHECKSTYLE:OFF and CHECKSTYLE:ON -->
<module name="SuppressionCommentFilter"/>
<!-- Checks for Javadoc comments. -->
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
<!-- module name="JavadocMethod"/ -->
<!-- module name="JavadocType"/ -->
<!-- module name="JavadocVariable"/ -->
<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
<module name="MemberName">
<property name="format" value="^[a-z_](_?[a-zA-Z0-9]+)*$"/>
</module>
<module name="ConstantName">
<!-- Normal rules, except that:
- * any name can start with an underscore.
- * "log" is allowed; this is a traditional name for log objects
- * names ending with "ThreadLocal" are allowed so that threadlocal vars don't have to be
- all-caps. They are static final, but are not really constants. Yes, type prefixes
- on variable names sucks ("hungarian notation") but checkstyle doesn't allow
- name rules to vary by the type of the constant, and no other alternative seems
- any better.
-->
<property name="format"
value="^(([a-z][a-zA-Z]*ThreadLocal)|([A-Z][A-Z0-9]*(_[A-Z0-9]+)*))$"/>
</module>
<module name="LocalVariableName">
<property name="format" value="^[a-z_](_?[a-zA-Z0-9]+)*$"/>
</module>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="LocalFinalVariableName"/>
<module name="ParameterName">
<property name="format" value="^[a-z_](_?[a-zA-Z0-9]+)*$"/>
</module>
<module name="StaticVariableName"/>
<module name="TypeName">
<property name="format" value="^[A-Z][a-zA-Z0-9_]*$" />
</module>
<module name="IllegalImport"/>
<module name="RedundantImport"/>
<module name="UnusedImports">
<property name="processJavadoc" value="true"/>
</module>
<module name="ModifierOrderCheck" />
<module name="HideUtilityClassConstructor"/>
<module name="MethodLength">
<property name="max" value="300" />
</module>
<module name="ParameterNumber">
<property name="max" value="10" />
</module>
<module name="NeedBraces">
<property name="allowSingleLineStatement" value="true" />
</module>
<module name="LeftCurly">
</module>
<module name="RightCurly">
<property name="option" value="alone"/>
</module>
<module name="WhitespaceAfter" />
<module name="NoWhitespaceAfter" />
<!-- Checks for common coding problems -->
<!-- See http://checkstyle.sf.net/config_coding.html -->
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="InnerAssignment"/>
<module name="DefaultComesLast"/>
<module name="FallThrough"/>
<!-- Checks for class design -->
<!-- See http://checkstyle.sf.net/config_design.html -->
<!-- module name="DesignForExtension"/ -->
<module name="com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck">
<property name="severity" value="ignore"/>
</module>
<!-- module name="FinalClass"/ -->
<!-- module name="HideUtilityClassConstructor"/ -->
<!-- module name="InterfaceIsType"/ -->
<!-- module name="VisibilityModifier"/ -->
<module name="com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck">
<property name="packageAllowed" value="false"/>
<property name="protectedAllowed" value="true"/>
<property name="publicMemberPattern" value="^serialVersionUID"/>
<property name="severity" value="warning"/>
</module>
<module name="Regexp">
<property name="format" value="[ \t]+$"/>
<property name="illegalPattern" value="true"/>
<property name="message" value="Trailing whitespace"/>
</module>
<!-- Miscellaneous other checks. -->
<!-- See http://checkstyle.sf.net/config_misc.html -->
<!-- module name="FinalParameters"/ -->
<!-- Line with Trailing Spaces (disabled as it's to noisy)
<module name="GenericIllegalRegexp">
<property name="format" value="\s+$"/>
<property name="message" value="Line has trailing spaces."/>
</module>
-->
<module name="UpperEll"/>
<module name="ArrayTypeStyle"/>
<module name="WhitespaceAround">
<property name="tokens" value=""/>
</module>
<module name="StringLiteralEquality"/>
<module name="NoFinalizer"/>
<module name="MissingOverride"/>
<module name="DeclarationOrder"/>
<!--module name="MultipleStringLiterals"/-->
<module name="OneStatementPerLine"/>
<module name="Indentation"/>
</module>
</module>