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