|
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 <!-- Checks that a package.html file exists for each package. --> |
|
36 <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml --> |
|
37 <!-- module name="PackageHtml"/--> |
|
38 |
|
39 <!-- Checks whether files end with a new line. --> |
|
40 <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> |
|
41 <!--<module name="NewlineAtEndOfFile"/>--> |
|
42 |
|
43 <!-- Checks that property files contain the same keys. --> |
|
44 <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> |
|
45 <module name="Translation"/> |
|
46 |
|
47 |
|
48 <module name="TreeWalker"> |
|
49 |
|
50 <!-- Checks for Javadoc comments. --> |
|
51 <!-- See http://checkstyle.sf.net/config_javadoc.html --> |
|
52 <!--<module name="JavadocMethod"/> |
|
53 <module name="JavadocVariable"/> |
|
54 <module name="JavadocStyle"/>--> |
|
55 |
|
56 <module name="JavadocType"> |
|
57 <property name="scope" value="public"/> |
|
58 <property name="allowMissingParamTags" value="true"/> |
|
59 </module> |
|
60 |
|
61 <!-- Checks for Naming Conventions. --> |
|
62 <!-- See http://checkstyle.sf.net/config_naming.html --> |
|
63 <module name="ConstantName"/> |
|
64 <module name="LocalFinalVariableName"/> |
|
65 <module name="LocalVariableName"/> |
|
66 <module name="MemberName"/> |
|
67 <module name="MethodName"/> |
|
68 <module name="PackageName"/> |
|
69 <module name="ParameterName"/> |
|
70 <module name="StaticVariableName"/> |
|
71 <module name="TypeName"/> |
|
72 |
|
73 |
|
74 <!-- Checks for Headers --> |
|
75 <!-- See http://checkstyle.sf.net/config_header.html --> |
|
76 <!-- <module name="Header"> --> |
|
77 <!-- The follow property value demonstrates the ability --> |
|
78 <!-- to have access to ANT properties. In this case it uses --> |
|
79 <!-- the ${basedir} property to allow Checkstyle to be run --> |
|
80 <!-- from any directory within a project. See property --> |
|
81 <!-- expansion, --> |
|
82 <!-- http://checkstyle.sf.net/config.html#properties --> |
|
83 <!-- <property --> |
|
84 <!-- name="headerFile" --> |
|
85 <!-- value="${basedir}/java.header"/> --> |
|
86 <!-- </module> --> |
|
87 |
|
88 <!-- Following interprets the header file as regular expressions. --> |
|
89 <!-- <module name="RegexpHeader"/> --> |
|
90 |
|
91 |
|
92 <!-- Checks for imports --> |
|
93 <!-- See http://checkstyle.sf.net/config_import.html --> |
|
94 <!--<module name="AvoidStarImport"/>--> |
|
95 <module name="IllegalImport"/> <!-- defaults to sun.* packages --> |
|
96 <module name="RedundantImport"/> |
|
97 <module name="UnusedImports"/> |
|
98 |
|
99 |
|
100 <!-- Checks for Size Violations. --> |
|
101 <!-- See http://checkstyle.sf.net/config_sizes.html --> |
|
102 <module name="FileLength"/> |
|
103 <!--<module name="LineLength"/>--> |
|
104 <module name="MethodLength"/> |
|
105 <module name="ParameterNumber"/> |
|
106 |
|
107 |
|
108 <!-- Checks for whitespace --> |
|
109 <!-- See http://checkstyle.sf.net/config_whitespace.html --> |
|
110 <!--<module name="EmptyForIteratorPad"/> |
|
111 <module name="MethodParamPad"/> |
|
112 <module name="NoWhitespaceAfter"/> |
|
113 <module name="NoWhitespaceBefore"/> |
|
114 <module name="OperatorWrap"/> |
|
115 <module name="ParenPad"/> |
|
116 <module name="TypecastParenPad"/> |
|
117 <module name="WhitespaceAfter"/>--> |
|
118 <module name="TabCharacter"/> |
|
119 <module name="WhitespaceAround"/> |
|
120 |
|
121 |
|
122 <!-- Modifier Checks --> |
|
123 <!-- See http://checkstyle.sf.net/config_modifiers.html --> |
|
124 <module name="ModifierOrder"/> |
|
125 <module name="RedundantModifier"/> |
|
126 |
|
127 |
|
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"/> |
|
132 <!--<module name="LeftCurly">--> |
|
133 <!--<module name="NeedBraces"/>--> |
|
134 <!--<module name="RightCurly">--> |
|
135 |
|
136 |
|
137 <!-- Checks for common coding problems --> |
|
138 <!-- See http://checkstyle.sf.net/config_coding.html --> |
|
139 <module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE --> |
|
140 <module name="EmptyStatement"/> |
|
141 <module name="EqualsHashCode"/> |
|
142 <!--<module name="HiddenField"/>--> |
|
143 <module name="IllegalInstantiation"/> |
|
144 <module name="InnerAssignment"/> |
|
145 <!--<module name="MagicNumber"/>--> |
|
146 <module name="MissingSwitchDefault"/> |
|
147 <module name="RedundantThrows"/> |
|
148 <module name="SimplifyBooleanExpression"/> |
|
149 <module name="SimplifyBooleanReturn"/> |
|
150 |
|
151 <!-- Checks for class design --> |
|
152 <!-- See http://checkstyle.sf.net/config_design.html --> |
|
153 <!--<module name="DesignForExtension"/>--> |
|
154 <module name="FinalClass"/> |
|
155 <module name="HideUtilityClassConstructor"/> |
|
156 <module name="InterfaceIsType"/> |
|
157 <module name="VisibilityModifier"/> |
|
158 |
|
159 |
|
160 <!-- Miscellaneous other checks. --> |
|
161 <!-- See http://checkstyle.sf.net/config_misc.html --> |
|
162 <module name="ArrayTypeStyle"/> |
|
163 <!--<module name="FinalParameters"/> |
|
164 <module name="GenericIllegalRegexp"> |
|
165 <property name="format" value="\s+$"/> |
|
166 <property name="message" value="Line has trailing spaces."/> |
|
167 </module>--> |
|
168 <module name="TodoComment"/> |
|
169 <module name="UpperEll"/> |
|
170 |
|
171 <module name="ExplicitInitialization"/> |
|
172 <module name="UnnecessaryParentheses"/> |
|
173 <module name="DeclarationOrder"/> |
|
174 |
|
175 <module name="StringLiteralEquality"/> |
|
176 |
|
177 <module name="CyclomaticComplexity"> |
|
178 <property name="max" value="25"/> |
|
179 </module> |
|
180 |
|
181 <module name="SuperFinalize"/> |
|
182 </module> |
|
183 |
|
184 </module> |