1 <?xml version="1.0"?>
\r
2 <!DOCTYPE module PUBLIC
\r
3 "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
\r
4 "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
\r
6 <!-- Checkstyle configuration that checks the sun coding conventions from: - the Java Language Specification at http://java.sun.com/docs/books/jls/second_edition/html/index.html
\r
7 - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ - the Javadoc guidelines at http://java.sun.com/j2se/javadoc/writingdoccomments/index.html - the
\r
8 JDK Api documentation http://java.sun.com/j2se/docs/api/index.html - some best practices Checkstyle is very configurable. Be sure to read the documentation at http://checkstyle.sf.net
\r
9 (or in your downloaded distribution). Most Checks are configurable, be sure to consult the documentation. To completely disable a check, just comment it out or delete
\r
10 it from the file. Finally, it is worth reading the documentation. -->
\r
12 <module name="Checker">
\r
13 <!-- If you set the basedir property below, then all reported file names will be relative to the specified directory. See http://checkstyle.sourceforge.net/5.x/config.html#Checker
\r
14 <property name="basedir" value="${basedir}"/> -->
\r
16 <!-- Checks that each Java package has a Javadoc file used for commenting. -->
\r
17 <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
\r
18 <module name="JavadocPackage">
\r
19 <property name="severity" value="warning" />
\r
20 <!-- <property name="allowLegacy" value="true" /> -->
\r
23 <!-- Checks whether files end with a new line. -->
\r
24 <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
\r
25 <module name="NewlineAtEndOfFile" />
\r
27 <!-- Checks that property files contain the same keys. -->
\r
28 <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
\r
29 <module name="Translation" />
\r
31 <module name="FileLength" />
\r
33 <!-- Following interprets the header file as regular expressions. -->
\r
34 <!-- <module name="RegexpHeader"/> -->
\r
36 <module name="FileTabCharacter">
\r
37 <property name="eachLine" value="true" />
\r
40 <module name="RegexpSingleline">
\r
41 <!-- \s matches whitespace character, $ matches end of line. -->
\r
42 <property name="format" value="\s+$" />
\r
43 <property name="message" value="Line has trailing spaces." />
\r
47 <module name="TreeWalker">
\r
49 <property name="cacheFile" value="${checkstyle.cache.file}" />
\r
51 <!-- Checks for Javadoc comments. -->
\r
52 <!-- See http://checkstyle.sf.net/config_javadoc.html -->
\r
53 <module name="JavadocMethod" >
\r
54 <property name="severity" value="warning" />
\r
56 <module name="JavadocType" >
\r
57 <property name="severity" value="warning" />
\r
59 <module name="JavadocVariable" >
\r
60 <property name="severity" value="warning" />
\r
62 <module name="JavadocStyle" >
\r
63 <property name="severity" value="warning" />
\r
67 <!-- Checks for Naming Conventions. -->
\r
68 <!-- See http://checkstyle.sf.net/config_naming.html -->
\r
69 <module name="ConstantName" />
\r
70 <module name="LocalFinalVariableName" />
\r
71 <module name="LocalVariableName">
\r
72 <property name="format" value="^[a-z][a-zA-Z0-9_]*$" />
\r
74 <module name="MemberName">
\r
75 <property name="format" value="^[a-z][a-zA-Z0-9_]*$" />
\r
77 <module name="MethodName">
\r
78 <property name="format" value="^[a-z][a-zA-Z0-9_]*$" />
\r
80 <module name="PackageName" />
\r
81 <module name="ParameterName">
\r
82 <property name="format" value="^[a-z][a-zA-Z0-9_]*$" />
\r
84 <module name="StaticVariableName" />
\r
85 <module name="TypeName">
\r
86 <property name="format" value="^[A-Z][a-zA-Z0-9_]*$" />
\r
88 <module name="PackageName" />
\r
89 <module name="LocalFinalVariableName" />
\r
90 <module name="LocalVariableName">
\r
91 <property name="format" value="^[a-z][a-zA-Z0-9_]*$" />
\r
93 <module name="StaticVariableName" />
\r
95 <!-- Checks for imports -->
\r
96 <!-- See http://checkstyle.sf.net/config_import.html -->
\r
97 <module name="AvoidStarImport" />
\r
98 <module name="IllegalImport" /> <!-- defaults to sun.* packages -->
\r
99 <module name="RedundantImport" />
\r
100 <module name="UnusedImports" />
\r
103 <!-- Checks for Size Violations. -->
\r
104 <!-- See http://checkstyle.sf.net/config_sizes.html -->
\r
105 <module name="LineLength">
\r
106 <property name="max" value="160" />
\r
107 <property name="severity" value="info" />
\r
109 <module name="MethodLength">
\r
110 <property name="max" value="200" />
\r
111 <property name="severity" value="info" />
\r
113 <module name="ParameterNumber">
\r
114 <property name="severity" value="info" />
\r
118 <!-- Checks for whitespace -->
\r
119 <!-- See http://checkstyle.sf.net/config_whitespace.html -->
\r
120 <module name="EmptyForIteratorPad" />
\r
121 <module name="MethodParamPad" />
\r
122 <module name="NoWhitespaceAfter" />
\r
123 <module name="NoWhitespaceBefore" />
\r
124 <module name="OperatorWrap" />
\r
125 <module name="ParenPad" />
\r
126 <module name="TypecastParenPad" />
\r
127 <module name="WhitespaceAfter" />
\r
128 <module name="WhitespaceAround" />
\r
131 <!-- Modifier Checks -->
\r
132 <!-- See http://checkstyle.sf.net/config_modifiers.html -->
\r
133 <module name="ModifierOrder" />
\r
134 <module name="RedundantModifier" />
\r
137 <!-- Checks for blocks. You know, those {}'s -->
\r
138 <!-- See http://checkstyle.sf.net/config_blocks.html -->
\r
139 <module name="AvoidNestedBlocks" />
\r
140 <module name="EmptyBlock" />
\r
141 <module name="LeftCurly" />
\r
142 <module name="NeedBraces" />
\r
143 <module name="RightCurly" />
\r
146 <!-- Checks for common coding problems -->
\r
147 <!-- See http://checkstyle.sf.net/config_coding.html -->
\r
148 <module name="AvoidInlineConditionals" />
\r
149 <module name="DoubleCheckedLocking" /> <!-- MY FAVOURITE -->
\r
150 <module name="EmptyStatement" />
\r
151 <module name="EqualsHashCode" />
\r
152 <module name="HiddenField" />
\r
153 <module name="IllegalInstantiation" />
\r
154 <module name="InnerAssignment" />
\r
155 <module name="MagicNumber">
\r
156 <property name="severity" value="info" />
\r
158 <module name="MissingSwitchDefault" />
\r
159 <module name="RedundantThrows" />
\r
160 <module name="SimplifyBooleanExpression" />
\r
161 <module name="SimplifyBooleanReturn" />
\r
163 <!-- Checks for class design -->
\r
164 <!-- See http://checkstyle.sf.net/config_design.html -->
\r
165 <!-- <module name="DesignForExtension" /> -->
\r
166 <!-- <module name="FinalClass" /> -->
\r
167 <module name="HideUtilityClassConstructor" />
\r
168 <module name="InterfaceIsType" />
\r
169 <module name="VisibilityModifier" />
\r
172 <!-- Miscellaneous other checks. -->
\r
173 <!-- See http://checkstyle.sf.net/config_misc.html -->
\r
174 <module name="ArrayTypeStyle" />
\r
175 <module name="FinalParameters" />
\r
176 <!-- <module name="TodoComment" /> -->
\r
177 <module name="UpperEll" />
\r