1<?xml version="1.0"?> 2<!DOCTYPE module PUBLIC 3 "-//Puppy Crawl//DTD Check Configuration 1.2//EN" 4 "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> 5<!-- 6 Copyright (C) 2015 ZXing authors 7 8 Licensed under the Apache License, Version 2.0 (the "License"); 9 you may not use this file except in compliance with the License. 10 You may obtain a copy of the License at 11 12 http://www.apache.org/licenses/LICENSE-2.0 13 14 Unless required by applicable law or agreed to in writing, software 15 distributed under the License is distributed on an "AS IS" BASIS, 16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 See the License for the specific language governing permissions and 18 limitations under the License. 19 --> 20<!-- 21 Derived from checkstyle's Sun code style config 22 --> 23<module name="Checker"> 24 <!-- 25 If you set the basedir property below, then all reported file 26 names will be relative to the specified directory. See 27 http://checkstyle.sourceforge.net/5.x/config.html#Checker 28 29 <property name="basedir" value="${basedir}"/> 30 --> 31 32 <!-- Checks that each Java package has a Javadoc file used for commenting. --> 33 <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage --> 34 <!-- <module name="JavadocPackage"/> --> 35 36 <!-- Checks whether files end with a new line. --> 37 <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> 38 <!--<module name="NewlineAtEndOfFile"/>--> 39 40 <!-- Checks that property files contain the same keys. --> 41 <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> 42 <module name="Translation"/> 43 44 <module name="FileLength"/> 45 46 <!-- Following interprets the header file as regular expressions. --> 47 <!-- <module name="RegexpHeader"/> --> 48 49 <module name="FileTabCharacter"> 50 <property name="eachLine" value="true"/> 51 </module> 52 53 <!-- 54 <module name="RegexpSingleline"> 55 <property name="format" value="\s+$"/> 56 <property name="message" value="Line has trailing spaces."/> 57 </module> 58 --> 59 60 <module name="TreeWalker"> 61 62 <!-- required for SuppressWarningsFilter (and other Suppress* rules not used here) --> 63 <!-- see http://checkstyle.sourceforge.net/config_annotation.html#SuppressWarningsHolder --> 64 <module name="SuppressWarningsHolder"/> 65 66 <!-- Checks for Javadoc comments. --> 67 <!-- See http://checkstyle.sf.net/config_javadoc.html --> 68 <!-- 69 <module name="JavadocMethod"> 70 <property name="scope" value="protected"/> 71 </module> 72 --> 73 <module name="JavadocType"> 74 <property name="scope" value="protected"/> 75 </module> 76 <!--<module name="JavadocVariable"/>--> 77 <module name="JavadocStyle"> 78 <property name="checkFirstSentence" value="false"/> 79 </module> 80 81 82 <!-- Checks for Naming Conventions. --> 83 <!-- See http://checkstyle.sf.net/config_naming.html --> 84 <!-- <module name="ConstantName"/> --> 85 <module name="LocalFinalVariableName"/> 86 <!-- <module name="LocalVariableName"/> --> 87 <module name="MemberName"/> 88 <module name="MethodName"/> 89 <module name="NonEmptyAtclauseDescription"/> 90 <module name="PackageName"/> 91 <!-- <module name="ParameterName"/> --> 92 <module name="StaticVariableName"/> 93 <module name="TypeName"/> 94 95 96 <!-- Checks for imports --> 97 <!-- See http://checkstyle.sf.net/config_import.html --> 98 <module name="AvoidStarImport"/> 99 <module name="AvoidStaticImport"/> 100 <module name="IllegalImport"/> <!-- defaults to sun.* packages --> 101 <module name="RedundantImport"/> 102 <module name="UnusedImports"/> 103 104 105 <!-- Checks for Size Violations. --> 106 <!-- See http://checkstyle.sf.net/config_sizes.html --> 107 <!-- <module name="MethodLength"/> --> 108 <!-- <module name="ParameterNumber"/> --> 109 110 111 <!-- Checks for whitespace --> 112 <!-- See http://checkstyle.sf.net/config_whitespace.html --> 113 <module name="EmptyForIteratorPad"/> 114 <module name="MethodParamPad"/> 115 <!-- <module name="OperatorWrap"/> --> 116 <module name="ParenPad"/> 117 <module name="TypecastParenPad"/> 118 <module name="WhitespaceAfter"> 119 <property name="tokens" value="TYPECAST, SEMI"/> 120 </module> 121 <module name="WhitespaceAround"> 122 <property name="allowEmptyConstructors" value="true"/> 123 </module> 124 <!-- <module name="UnnecessaryParentheses"/> --> 125 126 127 <!-- Modifier Checks --> 128 <!-- See http://checkstyle.sf.net/config_modifiers.html --> 129 <module name="ModifierOrder"/> 130 <module name="RedundantModifier"/> 131 132 133 <!-- Checks for blocks. You know, those {}'s --> 134 <!-- See http://checkstyle.sf.net/config_blocks.html --> 135 <module name="AvoidNestedBlocks"/> 136 <module name="EmptyBlock"> 137 <property name="option" value="text"/> 138 </module> 139 <module name="LeftCurly"/> 140 <module name="NeedBraces"/> 141 <module name="RightCurly"/> 142 143 144 <!-- Checks for common coding problems --> 145 <!-- See http://checkstyle.sf.net/config_coding.html --> 146 <!--<module name="AvoidInlineConditionals"/>--> 147 <module name="EmptyStatement"/> 148 <module name="EqualsAvoidNull"/> 149 <module name="EqualsHashCode"/> 150 <!--<module name="HiddenField"/>--> 151 <module name="IllegalInstantiation"/> 152 <!-- <module name="IllegalType"/> --> 153 <!-- <module name="InnerAssignment"/> --> 154 <!-- <module name="MagicNumber"/> --> 155 <!-- <module name="MissingSwitchDefault"/> --> 156 <module name="MissingDeprecated"/> 157 <module name="MissingOverride"/> 158 <module name="OneStatementPerLine"/> 159 <module name="MultipleVariableDeclarations"/> 160 <module name="DefaultComesLast"/> 161 <module name="SimplifyBooleanExpression"/> 162 <module name="SimplifyBooleanReturn"/> 163 <module name="StringLiteralEquality"/> 164 165 <!-- Checks for class design --> 166 <!-- See http://checkstyle.sf.net/config_design.html --> 167 <!-- <module name="DesignForExtension"/> --> 168 <module name="FinalClass"/> 169 <module name="HideUtilityClassConstructor"/> 170 <module name="InterfaceIsType"/> 171 <module name="OneTopLevelClass"/> 172 <module name="SuperFinalize"/> 173 <!-- <module name="VisibilityModifier"/> --> 174 175 176 <!-- Miscellaneous other checks. --> 177 <!-- See http://checkstyle.sf.net/config_misc.html --> 178 <module name="ArrayTypeStyle"/> 179 <!--<module name="FinalParameters"/>--> 180 <!-- <module name="TodoComment"/> --> 181 <module name="UpperEll"/> 182 183 <module name="Indentation"> 184 <property name="basicOffset" value="2" /> 185 <property name="braceAdjustment" value="0" /> 186 <property name="caseIndent" value="2" /> 187 <property name="arrayInitIndent" value="2"/> 188 </module> 189 190 </module> 191 192 <!-- Support @SuppressWarnings (added in Checkstyle 5.7) --> 193 <!-- see http://checkstyle.sourceforge.net/config.html#SuppressWarningsFilter --> 194 <module name="SuppressWarningsFilter"/> 195 196 <!-- Checks properties file for a duplicated properties. --> 197 <!-- See http://checkstyle.sourceforge.net/config_misc.html#UniqueProperties --> 198 <module name="UniqueProperties"/> 199 200 <module name="LineLength"> 201 <property name="max" value="120"/> 202 </module> 203 204</module> 205