4
* Copyright 2001-2004 The Apache Software Foundation.
6
* Licensed under the Apache License, Version 2.0 (the "License");
7
* you may not use this file except in compliance with the License.
8
* You may obtain a copy of the License at
10
* http://www.apache.org/licenses/LICENSE-2.0
12
* Unless required by applicable law or agreed to in writing, software
13
* distributed under the License is distributed on an "AS IS" BASIS,
14
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
* See the License for the specific language governing permissions and
16
* limitations under the License.
20
<!DOCTYPE module PUBLIC
21
"-//Puppy Crawl//DTD Check Configuration 1.1//EN"
22
"http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
25
Checkstyle checks configured for Maven.
28
<module name="Checker">
30
<!-- Checks that a package.html file exists for each package. -->
31
<!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
32
<module name="PackageHtml"/>
34
<!-- Checks whether files end with a new line. -->
35
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
36
<module name="NewlineAtEndOfFile"/>
38
<!-- Checks that property files contain the same keys. -->
39
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
40
<module name="Translation"/>
42
<module name="TreeWalker">
44
<property name="cacheFile" value="${checkstyle.cache.file}"/>
46
<!-- ************************************************************** -->
47
<!-- Checks that are different from the sun coding conventions ones -->
48
<!-- ************************************************************** -->
49
<module name="Header">
50
<property name="headerFile" value="${maven.checkstyle.header.file}"/>
51
<property name="ignoreLines" value="1,2,3,4,5,6"/>
53
<property name="tabWidth" value="4"/>
54
<module name="LeftCurly">
55
<property name="option" value="nl"/>
57
<module name="RightCurly">
58
<property name="option" value="alone"/>
60
<module name="LineLength">
61
<property name="max" value="132"/>
63
<module name="MethodLength">
64
<property name="max" value="175"/>
66
<!-- No Paren pad check
67
<module name="ParenPad"/>
69
<module name="ConstantName">
70
<property name="format" value="log|^[a-zA-Z][a-zA-Z0-9_]*$"/>
73
<!-- ************************************************************** -->
74
<!-- Default Sun coding conventions checks -->
75
<!-- ************************************************************** -->
77
<!-- Checks for Javadoc comments. -->
78
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
80
<module name="JavadocMethod"/>
81
<module name="JavadocType"/>
82
<module name="JavadocVariable"/>
86
<!-- Checks for Naming Conventions. -->
87
<!-- See http://checkstyle.sf.net/config_naming.html -->
88
<module name="LocalFinalVariableName"/>
89
<module name="LocalVariableName"/>
90
<module name="MethodName"/>
91
<module name="PackageName"/>
92
<module name="ParameterName"/>
93
<module name="StaticVariableName"/>
94
<module name="TypeName"/>
95
<module name="MemberName"/>
97
<!-- Checks for imports -->
98
<!-- See http://checkstyle.sf.net/config_import.html -->
99
<module name="AvoidStarImport"/>
100
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
101
<module name="RedundantImport"/>
102
<module name="UnusedImports"/>
105
<!-- Checks for Size Violations. -->
106
<!-- See http://checkstyle.sf.net/config_sizes.html -->
107
<module name="FileLength"/>
108
<module name="ParameterNumber"/>
111
<!-- Checks for whitespace -->
112
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
113
<module name="EmptyForIteratorPad"/>
114
<module name="NoWhitespaceAfter"/>
115
<module name="NoWhitespaceBefore"/>
116
<module name="OperatorWrap"/>
117
<module name="TabCharacter"/>
118
<module name="WhitespaceAfter"/>
119
<module name="WhitespaceAround"/>
122
<!-- Modifier Checks -->
123
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
124
<module name="ModifierOrder"/>
125
<module name="RedundantModifier"/>
128
<!-- Checks for blocks. You know, those {}'s -->
129
<!-- See http://checkstyle.sf.net/config_blocks.html -->
130
<module name="AvoidNestedBlocks"/>
131
<module name="EmptyBlock"/>
133
<module name="NeedBraces"/>
136
<!-- Checks for common coding problems -->
137
<!-- See http://checkstyle.sf.net/config_coding.html -->
138
<module name="AvoidInlineConditionals"/>
139
<module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE -->
140
<module name="EmptyStatement"/>
141
<module name="EqualsHashCode"/>
142
<module name="HiddenField">
143
<property name="ignoreSetter" value="true"/>
144
<property name="ignoreConstructorParameter" value="true"/>
146
<module name="IllegalInstantiation"/>
147
<module name="InnerAssignment"/>
148
<module name="MagicNumber"/>
149
<module name="MissingSwitchDefault"/>
150
<!--<module name="RedundantThrows"/>-->
151
<module name="SimplifyBooleanExpression"/>
152
<module name="SimplifyBooleanReturn"/>
154
<!-- Checks for class design -->
155
<!-- See http://checkstyle.sf.net/config_design.html -->
156
<!--<module name="DesignForExtension"/>-->
157
<module name="FinalClass"/>
158
<module name="HideUtilityClassConstructor"/>
159
<module name="InterfaceIsType"/>
160
<module name="VisibilityModifier"/>
163
<!-- Miscellaneous other checks. -->
164
<!-- See http://checkstyle.sf.net/config_misc.html -->
165
<module name="ArrayTypeStyle"/>
166
<!-- <module name="FinalParameters"/> -->
167
<module name="GenericIllegalRegexp">
168
<property name="format" value="\s+$"/>
169
<property name="message" value="Line has trailing spaces."/>
171
<module name="TodoComment"/>
172
<module name="UpperEll"/>