587
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : java_checkstyle_config.xml
|
|
5 |
Part of : Helium
|
|
6 |
|
|
7 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
8 |
All rights reserved.
|
|
9 |
This component and the accompanying materials are made available
|
|
10 |
under the terms of the License "Eclipse Public License v1.0"
|
|
11 |
which accompanies this distribution, and is available
|
|
12 |
at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
13 |
|
|
14 |
Initial Contributors:
|
|
15 |
Nokia Corporation - initial contribution.
|
|
16 |
|
|
17 |
Contributors:
|
|
18 |
|
|
19 |
Description:
|
|
20 |
|
|
21 |
============================================================================
|
|
22 |
-->
|
|
23 |
<!DOCTYPE module PUBLIC
|
|
24 |
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
|
|
25 |
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
|
|
26 |
|
|
27 |
<!--
|
|
28 |
|
|
29 |
Checkstyle configuration using Eclipse Helium profile
|
|
30 |
|
|
31 |
-->
|
|
32 |
|
|
33 |
<module name="Checker">
|
|
34 |
|
|
35 |
|
|
36 |
<!-- Allow exception in the code, but comment is needed -->
|
|
37 |
<module name="SuppressionCommentFilter" />
|
|
38 |
<module name="SuppressionCommentFilter">
|
|
39 |
<property name="offCommentFormat" value="CheckStyle\:([\w\|]+) OFF"/>
|
|
40 |
<property name="onCommentFormat" value="CheckStyle\:([\w\|]+) ON"/>
|
|
41 |
<property name="checkFormat" value="$1"/>
|
|
42 |
</module>
|
|
43 |
|
|
44 |
<!-- Checks that a package.html file exists for each package. -->
|
|
45 |
<!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
|
|
46 |
<!-- module name="PackageHtml"/-->
|
|
47 |
|
|
48 |
<!-- Checks whether files end with a new line. -->
|
|
49 |
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
|
|
50 |
<!--<module name="NewlineAtEndOfFile"/>-->
|
|
51 |
|
|
52 |
<!-- Checks that property files contain the same keys. -->
|
|
53 |
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
|
|
54 |
<module name="Translation"/>
|
|
55 |
<module name="FileLength"/>
|
|
56 |
<module name="FileTabCharacter"/>
|
|
57 |
|
|
58 |
<module name="TreeWalker">
|
|
59 |
<module name="FileContentsHolder"/>
|
|
60 |
|
|
61 |
<!-- Checks for Javadoc comments. -->
|
|
62 |
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
|
|
63 |
<!--<module name="JavadocMethod"/>
|
|
64 |
<module name="JavadocVariable"/>
|
|
65 |
<module name="JavadocStyle"/>-->
|
|
66 |
|
|
67 |
<module name="JavadocType">
|
|
68 |
<property name="scope" value="public"/>
|
|
69 |
</module>
|
|
70 |
|
|
71 |
<!-- Checks for Naming Conventions. -->
|
|
72 |
<!-- See http://checkstyle.sf.net/config_naming.html -->
|
|
73 |
<module name="ConstantName"/>
|
|
74 |
<module name="LocalFinalVariableName"/>
|
|
75 |
<module name="LocalVariableName"/>
|
|
76 |
<module name="MemberName"/>
|
|
77 |
<module name="MethodName"/>
|
|
78 |
<module name="PackageName"/>
|
|
79 |
<module name="ParameterName"/>
|
|
80 |
<module name="StaticVariableName"/>
|
|
81 |
<module name="TypeName"/>
|
|
82 |
|
|
83 |
|
|
84 |
<!-- Checks for Headers -->
|
|
85 |
<!-- See http://checkstyle.sf.net/config_header.html -->
|
|
86 |
<!-- <module name="Header"> -->
|
|
87 |
<!-- The follow property value demonstrates the ability -->
|
|
88 |
<!-- to have access to ANT properties. In this case it uses -->
|
|
89 |
<!-- the ${basedir} property to allow Checkstyle to be run -->
|
|
90 |
<!-- from any directory within a project. See property -->
|
|
91 |
<!-- expansion, -->
|
|
92 |
<!-- http://checkstyle.sf.net/config.html#properties -->
|
|
93 |
<!-- <property -->
|
|
94 |
<!-- name="headerFile" -->
|
|
95 |
<!-- value="${basedir}/java.header"/> -->
|
|
96 |
<!-- </module> -->
|
|
97 |
|
|
98 |
<!-- Following interprets the header file as regular expressions. -->
|
|
99 |
<!-- <module name="RegexpHeader"/> -->
|
|
100 |
|
|
101 |
|
|
102 |
<!-- Checks for imports -->
|
|
103 |
<!-- See http://checkstyle.sf.net/config_import.html -->
|
|
104 |
<!--<module name="AvoidStarImport"/>-->
|
|
105 |
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
|
|
106 |
<module name="RedundantImport"/>
|
|
107 |
<module name="UnusedImports"/>
|
|
108 |
|
|
109 |
|
|
110 |
<!-- Checks for Size Violations. -->
|
|
111 |
<!-- See http://checkstyle.sf.net/config_sizes.html -->
|
|
112 |
<!--<module name="LineLength"/>-->
|
|
113 |
<module name="MethodLength"/>
|
|
114 |
<module name="ParameterNumber"/>
|
|
115 |
|
|
116 |
|
|
117 |
<!-- Checks for whitespace -->
|
|
118 |
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
|
|
119 |
<!--<module name="EmptyForIteratorPad"/>
|
|
120 |
<module name="MethodParamPad"/>
|
|
121 |
<module name="NoWhitespaceAfter"/>
|
|
122 |
<module name="NoWhitespaceBefore"/>
|
|
123 |
<module name="OperatorWrap"/>
|
|
124 |
<module name="ParenPad"/>
|
|
125 |
<module name="TypecastParenPad"/>
|
|
126 |
<module name="WhitespaceAfter"/>-->
|
|
127 |
<module name="WhitespaceAround"/>
|
|
128 |
|
|
129 |
|
|
130 |
<!-- Modifier Checks -->
|
|
131 |
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
|
|
132 |
<module name="ModifierOrder"/>
|
|
133 |
<module name="RedundantModifier"/>
|
|
134 |
|
|
135 |
|
|
136 |
<!-- Checks for blocks. You know, those {}'s -->
|
|
137 |
<!-- See http://checkstyle.sf.net/config_blocks.html -->
|
|
138 |
<module name="AvoidNestedBlocks"/>
|
|
139 |
<module name="EmptyBlock"/>
|
|
140 |
<!--<module name="LeftCurly">-->
|
|
141 |
<!--<module name="NeedBraces"/>-->
|
|
142 |
<!--<module name="RightCurly">-->
|
|
143 |
|
|
144 |
|
|
145 |
<!-- Checks for common coding problems -->
|
|
146 |
<!-- See http://checkstyle.sf.net/config_coding.html -->
|
|
147 |
<module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE -->
|
|
148 |
<module name="EmptyStatement"/>
|
|
149 |
<module name="EqualsHashCode"/>
|
|
150 |
<!--<module name="HiddenField"/>-->
|
|
151 |
<module name="IllegalInstantiation"/>
|
|
152 |
<module name="InnerAssignment"/>
|
|
153 |
<!--<module name="MagicNumber"/>-->
|
|
154 |
<module name="MissingSwitchDefault"/>
|
|
155 |
<module name="RedundantThrows"/>
|
|
156 |
<module name="SimplifyBooleanExpression"/>
|
|
157 |
<module name="SimplifyBooleanReturn"/>
|
|
158 |
|
|
159 |
<!-- Checks for class design -->
|
|
160 |
<!-- See http://checkstyle.sf.net/config_design.html -->
|
|
161 |
<!--<module name="DesignForExtension"/>-->
|
|
162 |
<module name="FinalClass"/>
|
|
163 |
<module name="HideUtilityClassConstructor"/>
|
|
164 |
<module name="InterfaceIsType"/>
|
|
165 |
<module name="VisibilityModifier"/>
|
|
166 |
|
|
167 |
|
|
168 |
<!-- Miscellaneous other checks. -->
|
|
169 |
<!-- See http://checkstyle.sf.net/config_misc.html -->
|
|
170 |
<module name="ArrayTypeStyle"/>
|
|
171 |
<!--<module name="FinalParameters"/>
|
|
172 |
<module name="GenericIllegalRegexp">
|
|
173 |
<property name="format" value="\s+$"/>
|
|
174 |
<property name="message" value="Line has trailing spaces."/>
|
|
175 |
</module>-->
|
|
176 |
<module name="TodoComment"/>
|
|
177 |
<module name="UpperEll"/>
|
|
178 |
|
|
179 |
<module name="ExplicitInitialization"/>
|
|
180 |
<module name="UnnecessaryParentheses"/>
|
|
181 |
<module name="DeclarationOrder"/>
|
|
182 |
|
|
183 |
<module name="StringLiteralEquality"/>
|
|
184 |
|
|
185 |
<module name="CyclomaticComplexity">
|
|
186 |
<property name="max" value="26"/>
|
|
187 |
</module>
|
|
188 |
|
|
189 |
<module name="SuperFinalize"/>
|
|
190 |
|
|
191 |
<module name="IllegalCatch"/>
|
|
192 |
</module>
|
|
193 |
|
|
194 |
</module>
|