加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
checkstyle.xml 5.24 KB
一键复制 编辑 原始数据 按行查看 历史
Stas Gromov 提交于 2016-01-25 15:18 . add all needed checkstyle rules
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="charset" value="UTF-8"/>
<module name="TreeWalker">
<module name="AnnotationLocation">
<property name="allowSamelineSingleParameterlessAnnotation" value="false"/>
</module>
<module name="AnnotationUseStyle"/>
<module name="MissingDeprecated"/>
<module name="MissingOverride"/>
<module name="AvoidNestedBlocks">
<property name="allowInSwitchCase" value="true"/>
</module>
<module name="LeftCurly">
<property name="ignoreEnums" value="false"/>
</module>
<module name="NeedBraces"/>
<module name="RightCurly"/>
<module name="HideUtilityClassConstructor"/>
<module name="OneTopLevelClass"/>
<module name="VisibilityModifier"/>
<module name="CovariantEquals"/>
<module name="DeclarationOrder"/>
<module name="DefaultComesLast"/>
<module name="EmptyStatement"/>
<module name="EqualsAvoidNull"/>
<module name="EqualsHashCode"/>
<module name="ExplicitInitialization"/>
<module name="FinalLocalVariable"/>
<module name="IllegalInstantiation">
<property name="classes" value="java.lang.Boolean"/>
</module>
<module name="IllegalTokenText">
<property name="tokens" value="NUM_INT,NUM_LONG"/>
<property name="format" value="^0[^lx]"/>
<property name="ignoreCase" value="true"/>
</module>
<module name="IllegalType">
<property name="illegalClassNames" value="java.util.HashSet, java.util.HashMap, java.util.TreeSet, java.util.TreeMap"/>
</module>
<module name="InnerAssignment"/>
<module name="MissingSwitchDefault"/>
<module name="MultipleVariableDeclarations"/>
<module name="NoClone"/>
<module name="NoFinalizer"/>
<module name="OneStatementPerLine"/>
<module name="OverloadMethodsDeclarationOrder"/>
<module name="PackageDeclaration"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
<module name="UnnecessaryParentheses"/>
<module name="AvoidStarImport"/>
<module name="IllegalImport">
<property name="illegalPkgs" value="sun, junit.framework"/>
</module>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="ArrayTypeStyle"/>
<module name="CommentsIndentation"/>
<!-- Comparing this with null (i.e. this == null and this != null): -->
<module name="DescendantToken">
<property name="tokens" value="EQUAL,NOT_EQUAL"/>
<property name="limitedTokens" value="LITERAL_THIS,LITERAL_NULL"/>
<property name="maximumNumber" value="1"/>
<property name="maximumDepth" value="1"/>
<property name="sumTokenCounts" value="true"/>
</module>
<!--The initialiser in for performs no setup (where a while statement could be used instead): -->
<module name="DescendantToken">
<property name="tokens" value="FOR_INIT"/>
<property name="limitedTokens" value="EXPR"/>
<property name="minimumNumber" value="1"/>
</module>
<module name="Indentation"/>
<module name="OuterTypeFilename"/>
<module name="UpperEll"/>
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<module name="ClassTypeParameterName"/>
<module name="ConstantName"/>
<module name="InterfaceTypeParameterName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="MethodTypeParameterName"/>
<module name="PackageName">
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
</module>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>
<module name="LineLength">
<property name="max" value="120"/>
<property name="ignorePattern" value="^ *\* *[^ ]+$"/>
</module>
<module name="OuterTypeNumber"/>
<module name="GenericWhitespace"/>
<module name="MethodParamPad"/>
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround">
<property name="tokens" value="ASSIGN"/>
</module>
</module>
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="lf"/>
</module>
<module name="UniqueProperties"/>
<!-- the check to find trailing whitespace at the end of a line: -->
<module name="RegexpSingleline">
<!-- \s matches whitespace character, $ matches end of line. -->
<property name="format" value="\s+$"/>
</module>
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
</module>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化