Revision: | 1.1 |
Committed: | Mon Sep 15 15:13:35 2003 UTC (20 years, 8 months ago) by tim |
Content type: | text/xml |
Branch: | MAIN |
CVS Tags: | JSR166_DEC9_POST_ES_SUBMIT, JSR166_PFD, JSR166_DEC9_PRE_ES_SUBMIT, JSR166_NOV3_FREEZE |
Log Message: | Update checkstyle target, remove obsolete targets |
# | Content |
---|---|
1 | <?xml version="1.0"?> |
2 | <!DOCTYPE module PUBLIC |
3 | "-//Puppy Crawl//DTD Check Configuration 1.1//EN" |
4 | "http://www.puppycrawl.com/dtds/configuration_1_1.dtd"> |
5 | |
6 | <!-- |
7 | |
8 | Checkstyle configuration that checks the sun coding conventions from: |
9 | |
10 | - the Java Language Specification at |
11 | http://java.sun.com/docs/books/jls/second_edition/html/index.html |
12 | |
13 | - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ |
14 | |
15 | - the Javadoc guidelines at |
16 | http://java.sun.com/j2se/javadoc/writingdoccomments/index.html |
17 | |
18 | - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html |
19 | |
20 | - some best practices |
21 | |
22 | Checkstyle is very configurable. Be sure to read the documentation at |
23 | http://checkstyle.sf.net (or in your downloaded distribution). |
24 | |
25 | Most Checks are configurable, be sure to consult the documentation. |
26 | |
27 | To completely disable a check, just comment it out or delete it from the file. |
28 | |
29 | Finally, it is worth reading the documentation. |
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="JavadocType"/> |
54 | <module name="JavadocVariable"/> |
55 | |
56 | |
57 | <!-- Checks for Naming Conventions. --> |
58 | <!-- See http://checkstyle.sf.net/config_naming.html --> |
59 | <module name="ConstantName"/> |
60 | <module name="LocalFinalVariableName"/> |
61 | <module name="LocalVariableName"/> |
62 | <module name="MemberName"/> |
63 | <module name="MethodName"/> |
64 | <module name="PackageName"/> |
65 | <module name="ParameterName"/> |
66 | <module name="StaticVariableName"/> |
67 | <module name="TypeName"/> |
68 | |
69 | |
70 | <!-- Checks for Headers --> |
71 | <!-- See http://checkstyle.sf.net/config_header.html --> |
72 | <module name="Header"> |
73 | <!-- The follow property value demonstrates the ability --> |
74 | <!-- to have access to ANT properties. In this case it uses --> |
75 | <!-- the ${basedir} property to allow Checkstyle to be run --> |
76 | <!-- from any directory within a project. --> |
77 | <property name="headerFile" value="${basedir}/etc/checkstyle/java.header"/> |
78 | </module> |
79 | |
80 | <!-- Following interprets the header file as regular expressions. --> |
81 | <!-- <module name="RegexpHeader"/> --> |
82 | |
83 | |
84 | <!-- Checks for imports --> |
85 | <!-- See http://checkstyle.sf.net/config_import.html --> |
86 | <module name="AvoidStarImport"/> |
87 | <module name="IllegalImport"/> <!-- defaults to sun.* packages --> |
88 | <module name="RedundantImport"/> |
89 | <module name="UnusedImports"/> |
90 | |
91 | |
92 | <!-- Checks for Size Violations. --> |
93 | <!-- See http://checkstyle.sf.net/config_sizes.html --> |
94 | <module name="FileLength"/> |
95 | <module name="LineLength"/> |
96 | <module name="MethodLength"/> |
97 | <module name="ParameterNumber"/> |
98 | |
99 | |
100 | <!-- Checks for whitespace --> |
101 | <!-- See http://checkstyle.sf.net/config_whitespace.html --> |
102 | <module name="EmptyForIteratorPad"/> |
103 | <module name="NoWhitespaceAfter"/> |
104 | <module name="NoWhitespaceBefore"/> |
105 | <module name="OperatorWrap"/> |
106 | <module name="ParenPad"/> |
107 | <module name="TabCharacter"/> |
108 | <module name="WhitespaceAfter"/> |
109 | <module name="WhitespaceAround"/> |
110 | |
111 | |
112 | <!-- Modifier Checks --> |
113 | <!-- See http://checkstyle.sf.net/config_modifiers.html --> |
114 | <module name="ModifierOrder"/> |
115 | <module name="RedundantModifier"/> |
116 | |
117 | |
118 | <!-- Checks for blocks. You know, those {}'s --> |
119 | <!-- See http://checkstyle.sf.net/config_blocks.html --> |
120 | <module name="AvoidNestedBlocks"/> |
121 | <module name="EmptyBlock"/> |
122 | <module name="LeftCurly"/> |
123 | <module name="NeedBraces"/> |
124 | <module name="RightCurly"/> |
125 | |
126 | |
127 | <!-- Checks for common coding problems --> |
128 | <!-- See http://checkstyle.sf.net/config_coding.html --> |
129 | <module name="AvoidInlineConditionals"/> |
130 | <module name="DoubleCheckedLocking"/> <!-- MY FAVOURITE --> |
131 | <module name="EmptyStatement"/> |
132 | <module name="EqualsHashCode"/> |
133 | <module name="HiddenField"/> |
134 | <module name="IllegalInstantiation"/> |
135 | <module name="InnerAssignment"/> |
136 | <module name="MagicNumber"/> |
137 | <module name="MissingSwitchDefault"/> |
138 | <module name="RedundantThrows"/> |
139 | <module name="SimplifyBooleanExpression"/> |
140 | <module name="SimplifyBooleanReturn"/> |
141 | |
142 | <!-- Checks for class design --> |
143 | <!-- See http://checkstyle.sf.net/config_design.html --> |
144 | <module name="DesignForExtension"/> |
145 | <module name="FinalClass"/> |
146 | <module name="HideUtilityClassConstructor"/> |
147 | <module name="InterfaceIsType"/> |
148 | <module name="VisibilityModifier"/> |
149 | |
150 | |
151 | <!-- Miscellaneous other checks. --> |
152 | <!-- See http://checkstyle.sf.net/config_misc.html --> |
153 | <module name="ArrayTypeStyle"/> |
154 | <module name="FinalParameters"/> |
155 | <module name="GenericIllegalRegexp"> |
156 | <property name="format" value="\s+$"/> |
157 | <property name="message" value="Line has trailing spaces."/> |
158 | </module> |
159 | <module name="TodoComment"/> |
160 | <module name="UpperEll"/> |
161 | |
162 | </module> |
163 | |
164 | </module> |