| OLD | NEW | 
|---|
| (Empty) |  | 
|  | 1 <?xml version="1.0"?> | 
|  | 2 <!DOCTYPE module PUBLIC | 
|  | 3           "-//Puppy Crawl//DTD Check Configuration 1.3//EN" | 
|  | 4           "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> | 
|  | 5 | 
|  | 6 <!-- | 
|  | 7 | 
|  | 8     https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/sun_
     checks.xml | 
|  | 9 | 
|  | 10     Checkstyle configuration that checks the sun coding conventions from: | 
|  | 11 | 
|  | 12     - the Java Language Specification at | 
|  | 13       http://java.sun.com/docs/books/jls/second_edition/html/index.html | 
|  | 14 | 
|  | 15     - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ | 
|  | 16 | 
|  | 17     - the Javadoc guidelines at | 
|  | 18       http://java.sun.com/j2se/javadoc/writingdoccomments/index.html | 
|  | 19 | 
|  | 20     - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html | 
|  | 21 | 
|  | 22     - some best practices | 
|  | 23 | 
|  | 24   Checkstyle is very configurable. Be sure to read the documentation at | 
|  | 25   http://checkstyle.sf.net (or in your downloaded distribution). | 
|  | 26 | 
|  | 27   Most Checks are configurable, be sure to consult the documentation. | 
|  | 28 | 
|  | 29   To completely disable a check, just comment it out or delete it from the file. | 
|  | 30 | 
|  | 31   Finally, it is worth reading the documentation. | 
|  | 32 | 
|  | 33 --> | 
|  | 34 | 
|  | 35 <module name="Checker"> | 
|  | 36     <!-- | 
|  | 37         If you set the basedir property below, then all reported file | 
|  | 38         names will be relative to the specified directory. See | 
|  | 39         http://checkstyle.sourceforge.net/5.x/config.html#Checker | 
|  | 40 | 
|  | 41         <property name="basedir" value="${basedir}"/> | 
|  | 42     --> | 
|  | 43 | 
|  | 44     <property name="fileExtensions" value="java, properties, xml"/> | 
|  | 45 | 
|  | 46     <!-- Checks that a package-info.java file exists for each package.     --> | 
|  | 47     <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage --> | 
|  | 48     <!-- <module name="JavadocPackage"/> --> | 
|  | 49 | 
|  | 50     <!-- Checks whether files end with a new line.                        --> | 
|  | 51     <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> | 
|  | 52     <module name="NewlineAtEndOfFile"/> | 
|  | 53 | 
|  | 54     <!-- Checks that property files contain the same keys.         --> | 
|  | 55     <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> | 
|  | 56     <module name="Translation"/> | 
|  | 57 | 
|  | 58     <!-- Checks for Size Violations.                    --> | 
|  | 59     <!-- See http://checkstyle.sf.net/config_sizes.html --> | 
|  | 60     <module name="FileLength"/> | 
|  | 61 | 
|  | 62     <!-- Checks for whitespace                               --> | 
|  | 63     <!-- See http://checkstyle.sf.net/config_whitespace.html --> | 
|  | 64     <module name="FileTabCharacter"/> | 
|  | 65 | 
|  | 66     <!-- Miscellaneous other checks.                   --> | 
|  | 67     <!-- See http://checkstyle.sf.net/config_misc.html --> | 
|  | 68     <module name="RegexpSingleline"> | 
|  | 69        <property name="format" value="\s+$"/> | 
|  | 70        <property name="minimum" value="0"/> | 
|  | 71        <property name="maximum" value="0"/> | 
|  | 72        <property name="message" value="Line has trailing spaces."/> | 
|  | 73     </module> | 
|  | 74 | 
|  | 75     <!-- Checks for Headers                                --> | 
|  | 76     <!-- See http://checkstyle.sf.net/config_header.html   --> | 
|  | 77     <!-- <module name="Header"> --> | 
|  | 78     <!--   <property name="headerFile" value="${checkstyle.header.file}"/> --> | 
|  | 79     <!--   <property name="fileExtensions" value="java"/> --> | 
|  | 80     <!-- </module> --> | 
|  | 81 | 
|  | 82     <module name="TreeWalker"> | 
|  | 83 | 
|  | 84         <!-- Checks for Javadoc comments.                     --> | 
|  | 85         <!-- See http://checkstyle.sf.net/config_javadoc.html --> | 
|  | 86         <!-- <module name="JavadocMethod"/> --> | 
|  | 87         <!-- <module name="JavadocType"/> --> | 
|  | 88         <!-- <module name="JavadocVariable"/> --> | 
|  | 89         <!-- <module name="JavadocStyle"/> --> | 
|  | 90 | 
|  | 91         <!-- Checks for Naming Conventions.                  --> | 
|  | 92         <!-- See http://checkstyle.sf.net/config_naming.html --> | 
|  | 93         <module name="ConstantName"/> | 
|  | 94         <module name="LocalFinalVariableName"/> | 
|  | 95         <module name="LocalVariableName"/> | 
|  | 96         <module name="MemberName"/> | 
|  | 97         <module name="MethodName"/> | 
|  | 98         <module name="PackageName"/> | 
|  | 99         <module name="ParameterName"/> | 
|  | 100         <module name="StaticVariableName"/> | 
|  | 101         <module name="TypeName"/> | 
|  | 102 | 
|  | 103         <!-- Checks for imports                              --> | 
|  | 104         <!-- See http://checkstyle.sf.net/config_import.html --> | 
|  | 105         <module name="AvoidStarImport"/> | 
|  | 106         <module name="IllegalImport"/> <!-- defaults to sun.* packages --> | 
|  | 107         <module name="RedundantImport"/> | 
|  | 108         <module name="UnusedImports"> | 
|  | 109             <property name="processJavadoc" value="false"/> | 
|  | 110         </module> | 
|  | 111 | 
|  | 112         <!-- Checks for Size Violations.                    --> | 
|  | 113         <!-- See http://checkstyle.sf.net/config_sizes.html --> | 
|  | 114         <module name="LineLength"> | 
|  | 115             <property name="max" value="100"/> | 
|  | 116         </module> | 
|  | 117         <module name="MethodLength"/> | 
|  | 118         <module name="ParameterNumber"/> | 
|  | 119 | 
|  | 120         <!-- Checks for whitespace                               --> | 
|  | 121         <!-- See http://checkstyle.sf.net/config_whitespace.html --> | 
|  | 122         <module name="EmptyForIteratorPad"/> | 
|  | 123         <module name="GenericWhitespace"/> | 
|  | 124         <module name="MethodParamPad"/> | 
|  | 125         <module name="NoWhitespaceAfter"/> | 
|  | 126         <module name="NoWhitespaceBefore"/> | 
|  | 127         <!-- <module name="OperatorWrap"/> --> | 
|  | 128         <module name="ParenPad"/> | 
|  | 129         <module name="TypecastParenPad"/> | 
|  | 130         <module name="WhitespaceAfter"/> | 
|  | 131         <module name="WhitespaceAround"/> | 
|  | 132 | 
|  | 133         <!-- Modifier Checks                                    --> | 
|  | 134         <!-- See http://checkstyle.sf.net/config_modifiers.html --> | 
|  | 135         <module name="ModifierOrder"/> | 
|  | 136         <module name="RedundantModifier"/> | 
|  | 137 | 
|  | 138         <!-- Checks for blocks. You know, those {}'s         --> | 
|  | 139         <!-- See http://checkstyle.sf.net/config_blocks.html --> | 
|  | 140         <module name="AvoidNestedBlocks"/> | 
|  | 141         <!-- <module name="EmptyBlock"/> --> | 
|  | 142         <module name="LeftCurly"> | 
|  | 143             <property name="option" value="nl"/> | 
|  | 144         </module> | 
|  | 145         <module name="NeedBraces"/> | 
|  | 146         <module name="RightCurly"> | 
|  | 147             <property name="shouldStartLine" value="true"/> | 
|  | 148         </module> | 
|  | 149 | 
|  | 150         <!-- Checks for common coding problems               --> | 
|  | 151         <!-- See http://checkstyle.sf.net/config_coding.html --> | 
|  | 152         <module name="AvoidInlineConditionals"/> | 
|  | 153         <module name="EmptyStatement"/> | 
|  | 154         <module name="EqualsHashCode"/> | 
|  | 155         <!-- <module name="HiddenField"/> --> | 
|  | 156         <module name="IllegalInstantiation"/> | 
|  | 157         <module name="InnerAssignment"/> | 
|  | 158         <module name="MagicNumber"/> | 
|  | 159         <module name="MissingSwitchDefault"/> | 
|  | 160         <module name="SimplifyBooleanExpression"/> | 
|  | 161         <module name="SimplifyBooleanReturn"/> | 
|  | 162 | 
|  | 163         <!-- Checks for class design                         --> | 
|  | 164         <!-- See http://checkstyle.sf.net/config_design.html --> | 
|  | 165         <!-- <module name="DesignForExtension"/> --> | 
|  | 166         <module name="FinalClass"/> | 
|  | 167         <module name="HideUtilityClassConstructor"/> | 
|  | 168         <module name="InterfaceIsType"/> | 
|  | 169         <module name="VisibilityModifier"/> | 
|  | 170 | 
|  | 171         <!-- Miscellaneous other checks.                   --> | 
|  | 172         <!-- See http://checkstyle.sf.net/config_misc.html --> | 
|  | 173         <module name="ArrayTypeStyle"/> | 
|  | 174         <!-- <module name="FinalParameters"/> --> | 
|  | 175         <module name="TodoComment"/> | 
|  | 176         <module name="UpperEll"/> | 
|  | 177 | 
|  | 178     </module> | 
|  | 179 | 
|  | 180 </module> | 
| OLD | NEW | 
|---|