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<module name="Checker"> 7 <module name="SuppressWarningsFilter"/> 8 <module name="NewlineAtEndOfFile"/> 9 <module name="FileLength"/> 10 <module name="FileTabCharacter"/> 11 12 <!-- Trailing spaces --> 13 <module name="RegexpSingleline"> 14 <property name="format" value="\s+$"/> 15 <property name="message" value="Line has trailing spaces."/> 16 </module> 17 18 <!-- Space after 'for' and 'if' --> 19 <module name="RegexpSingleline"> 20 <property name="format" value="^\s*(for|if)\b[^ ]"/> 21 <property name="message" value="Space needed before opening parenthesis."/> 22 </module> 23 24 <!-- For each spacing --> 25 <module name="RegexpSingleline"> 26 <property name="format" value="^\s*for \(.*?([^ ]:|:[^ ])"/> 27 <property name="message" value="Space needed around ':' character."/> 28 </module> 29 30 <module name="TreeWalker"> 31 <property name="cacheFile" value="${checkstyle.cache.file}"/> 32 33 <!-- Checks for Javadoc comments. --> 34 <!-- See http://checkstyle.sf.net/config_javadoc.html --> 35 <!--module name="JavadocMethod"/--> 36 <!--module name="JavadocType"/--> 37 <!--module name="JavadocVariable"/--> 38 <module name="JavadocStyle"/> 39 40 41 <!-- Checks for Naming Conventions. --> 42 <!-- See http://checkstyle.sf.net/config_naming.html --> 43 <module name="ConstantName"/> 44 <module name="LocalFinalVariableName"/> 45 <module name="LocalVariableName"/> 46 <module name="MemberName"/> 47 <module name="MethodName"/> 48 <module name="PackageName"/> 49 <module name="ParameterName"/> 50 <module name="StaticVariableName"/> 51 <module name="TypeName"/> 52 53 54 <!-- Checks for imports --> 55 <!-- See http://checkstyle.sf.net/config_import.html --> 56 <module name="AvoidStarImport"/> 57 <module name="IllegalImport"/> 58 <!-- defaults to sun.* packages --> 59 <module name="RedundantImport"/> 60 <module name="UnusedImports"> 61 <property name="processJavadoc" value="true"/> 62 </module> 63 64 65 <!-- Checks for Size Violations. --> 66 <!-- See http://checkstyle.sf.net/config_sizes.html --> 67 <module name="LineLength"> 68 <property name="max" value="100"/> 69 </module> 70 <module name="MethodLength"> 71 <property name="max" value="160"/> 72 </module> 73 <module name="ParameterNumber"/> 74 75 76 <!-- Checks for whitespace --> 77 <!-- See http://checkstyle.sf.net/config_whitespace.html --> 78 <module name="GenericWhitespace"/> 79 <!--<module name="EmptyForIteratorPad"/>--> 80 <module name="MethodParamPad"/> 81 <module name="NoWhitespaceAfter"/> 82 <module name="NoWhitespaceBefore"/> 83 <module name="OperatorWrap"/> 84 <module name="ParenPad"/> 85 <module name="TypecastParenPad"/> 86 <module name="WhitespaceAfter"/> 87 <module name="WhitespaceAround"> 88 <property name="tokens" 89 value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, 90 COLON, DIV, DIV_ASSIGN, DO_WHILE, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_CATCH, 91 LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, 92 LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, 93 MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, SL, SLIST, 94 SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, LITERAL_ASSERT, TYPE_EXTENSION_AND"/> 95 </module> 96 97 98 <!-- Modifier Checks --> 99 <!-- See http://checkstyle.sf.net/config_modifiers.html --> 100 <module name="ModifierOrder"/> 101 <module name="RedundantModifier"/> 102 103 104 <!-- Checks for blocks. You know, those {}'s --> 105 <!-- See http://checkstyle.sf.net/config_blocks.html --> 106 <module name="AvoidNestedBlocks"/> 107 <!--module name="EmptyBlock"/--> 108 <module name="LeftCurly"/> 109 <!--<module name="NeedBraces"/>--> 110 <module name="RightCurly"/> 111 112 113 <!-- Checks for common coding problems --> 114 <!-- See http://checkstyle.sf.net/config_coding.html --> 115 <!--module name="AvoidInlineConditionals"/--> 116 <module name="CovariantEquals"/> 117 <module name="EmptyStatement"/> 118 <!--<module name="EqualsAvoidNull"/>--> 119 <module name="EqualsHashCode"/> 120 <!--module name="HiddenField"/--> 121 <module name="IllegalInstantiation"/> 122 <module name="InnerAssignment"/> 123 <!--<module name="MagicNumber"/>--> 124 <module name="MissingSwitchDefault"/> 125 <!--module name="RedundantThrows"/--> 126 <module name="SimplifyBooleanExpression"/> 127 <module name="SimplifyBooleanReturn"/> 128 129 <!-- Checks for class design --> 130 <!-- See http://checkstyle.sf.net/config_design.html --> 131 <!--module name="DesignForExtension"/--> 132 <module name="FinalClass"/> 133 <module name="HideUtilityClassConstructor"/> 134 <module name="InterfaceIsType"/> 135 <!--module name="VisibilityModifier"/--> 136 137 138 <!-- Miscellaneous other checks. --> 139 <!-- See http://checkstyle.sf.net/config_misc.html --> 140 <module name="ArrayTypeStyle"/> 141 <!--module name="FinalParameters"/--> 142 <module name="TodoComment"/> 143 <module name="UpperEll"/> 144 145 <!-- Make the @SuppressWarnings annotations available to Checkstyle --> 146 <module name="SuppressWarningsHolder"/> 147 </module> 148</module> 149