| <?xml version="1.0"?> |
| <!-- |
| ~ Licensed to the Apache Software Foundation (ASF) under one or more |
| ~ contributor license agreements. See the NOTICE file distributed with |
| ~ this work for additional information regarding copyright ownership. |
| ~ The ASF licenses this file to You under the Apache License, Version 2.0 |
| ~ (the "License"); you may not use this file except in compliance with |
| ~ the License. You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, software |
| ~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~ See the License for the specific language governing permissions and |
| ~ limitations under the License. |
| --> |
| |
| <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd"> |
| <module name = "Checker"> |
| <property name="charset" value="UTF-8"/> |
| <property name="severity" value="error"/> |
| <property name="fileExtensions" value="java, properties, xml"/> |
| <module name="Header"> |
| <property name="headerFile" value="${checkstyle.header.file}"/> |
| <property name="fileExtensions" value="java"/> |
| </module> |
| <module name="FileTabCharacter"> |
| <property name="eachLine" value="true"/> |
| </module> |
| <module name="FileLength"/> |
| <module name="NewlineAtEndOfFile"> |
| <property name="lineSeparator" value="lf"/> |
| </module> |
| <module name="Translation"/> |
| <module name="UniqueProperties"/> |
| <module name="SeverityMatchFilter"/> |
| |
| <module name="RegexpSingleline"> |
| <property name="format" value="System\.out\.println"/> |
| <property name="message" value="Prohibit invoking System.out.println in source code !"/> |
| </module> |
| <module name="RegexpSingleline"> |
| <property name="format" value="@author"/> |
| <property name="message" value="Please remove @author tag in javadoc!"/> |
| </module> |
| <module name="RegexpSingleline"> |
| <property name="format" value="\.printStackTrace"/> |
| <property name="message" value="Prohibit invoking .printStackTrace in source code ! Please use org.slf4j.Logger and write log instead."/> |
| </module> |
| |
| <module name="TreeWalker"> |
| |
| <!-- Naming Conventions --> |
| <module name="PackageName"> |
| <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/> |
| </module> |
| <module name="TypeName"/> |
| <module name="MethodName"/> |
| <module name="InterfaceTypeParameterName"/> |
| <module name="ClassTypeParameterName"> |
| <property name="format" value="^[A-Z0-9]*$"/> |
| </module> |
| <module name="MethodTypeParameterName"> |
| <property name="format" value="^[A-Z0-9]*$"/> |
| </module> |
| <module name="ConstantName"> |
| <property name="format" value="(^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$)|(^log$)"/> |
| </module> |
| <module name="StaticVariableName"/> |
| <module name="MemberName"/> |
| <module name="LocalVariableName"/> |
| <module name="LocalFinalVariableName"/> |
| <module name="ParameterName"/> |
| <module name="CatchParameterName"/> |
| <module name="AbbreviationAsWordInName"> |
| <property name="allowedAbbreviationLength" value="6"/> |
| </module> |
| |
| <!-- Size Violations --> |
| <module name="AnonInnerLength"> |
| <property name="max" value="30"/> |
| </module> |
| <module name="MethodLength"> |
| <property name="tokens" value="METHOD_DEF" /> |
| <property name="max" value="80" /> |
| </module> |
| <module name="LineLength"> |
| <property name="max" value="200"/> |
| <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/> |
| </module> |
| <module name="OuterTypeNumber"/> |
| |
| <!-- Whitespace --> |
| <module name="EmptyForInitializerPad"/> |
| <module name="EmptyForIteratorPad"/> |
| <module name="MethodParamPad"/> |
| <module name="ParenPad"/> |
| <module name="TypecastParenPad"/> |
| <module name="NoLineWrap"/> |
| <module name="OperatorWrap"/> |
| <module name="SeparatorWrap"> |
| <property name="id" value="SeparatorWrapDot"/> |
| <property name="tokens" value="DOT"/> |
| <property name="option" value="nl"/> |
| </module> |
| <module name="SeparatorWrap"> |
| <property name="id" value="SeparatorWrapComma"/> |
| <property name="tokens" value="COMMA"/> |
| <property name="option" value="EOL"/> |
| </module> |
| <module name="SeparatorWrap"> |
| <property name="id" value="SeparatorWrapEllipsis"/> |
| <property name="tokens" value="ELLIPSIS"/> |
| <property name="option" value="EOL"/> |
| </module> |
| <module name="SeparatorWrap"> |
| <property name="id" value="SeparatorWrapArrayDeclarator"/> |
| <property name="tokens" value="ARRAY_DECLARATOR"/> |
| <property name="option" value="EOL"/> |
| </module> |
| <module name="SeparatorWrap"> |
| <property name="id" value="SeparatorWrapMethodRef"/> |
| <property name="tokens" value="METHOD_REF"/> |
| <property name="option" value="nl"/> |
| </module> |
| <module name="GenericWhitespace"/> |
| <module name="NoWhitespaceBefore"/> |
| <module name="NoWhitespaceAfter"/> |
| <module name="WhitespaceAround"/> |
| <module name="WhitespaceAfter"/> |
| <module name="SingleSpaceSeparator"/> |
| <module name="EmptyLineSeparator"> |
| <property name="allowMultipleEmptyLines" value="false"/> |
| <property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/> |
| </module> |
| |
| <!-- Imports --> |
| <module name="AvoidStarImport"/> |
| <module name="IllegalImport"/> |
| <module name="RedundantImport"/> |
| <module name="UnusedImports"/> |
| <module name="CustomImportOrder"/> |
| |
| <!-- Annotations --> |
| <module name="AnnotationLocation"> |
| <property name="id" value="AnnotationLocationMostCases"/> |
| <property name="tokens" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/> |
| </module> |
| <module name="AnnotationLocation"> |
| <property name="id" value="AnnotationLocationVariables"/> |
| <property name="tokens" value="VARIABLE_DEF"/> |
| <property name="allowSamelineMultipleAnnotations" value="true"/> |
| </module> |
| <module name="AnnotationUseStyle"/> |
| <module name="MissingOverride"/> |
| <module name="SuppressWarnings"/> |
| <module name="MissingDeprecated"/> |
| <module name="SuppressWarningsHolder"/> |
| |
| <!-- Modifiers --> |
| <module name="ModifierOrder"/> |
| <module name="RedundantModifier"/> |
| |
| <!-- Coding --> |
| <module name="ArrayTrailingComma"/> |
| <module name="CovariantEquals"/> |
| <module name="DefaultComesLast"/> |
| <module name="DeclarationOrder"/> |
| <module name="EmptyStatement"/> |
| <module name="EqualsAvoidNull"/> |
| <module name="ExplicitInitialization"/> |
| <module name="FallThrough"/> |
| <module name="IllegalInstantiation"/> |
| <module name="IllegalCatch"> |
| <property name="illegalClassNames" value="Error,java.lang.Error" /> |
| </module> |
| <module name="IllegalThrows"/> |
| <module name="IllegalType"> |
| <property name="tokens" value="METHOD_DEF,PARAMETER_DEF,VARIABLE_DEF"/> |
| </module> |
| <module name="IllegalTokenText"> |
| <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/> |
| <property name="format" value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/> |
| <property name="message" value="Consider using special escape sequence instead of octal value or Unicode escaped value."/> |
| </module> |
| <module name="MissingSwitchDefault"/> |
| <module name="ModifiedControlVariable"/> |
| <module name="MultipleVariableDeclarations"/> |
| <module name="NestedIfDepth"> |
| <property name="max" value="3"/> |
| </module> |
| <module name="NestedTryDepth"/> |
| <module name="NoClone"/> |
| <!-- <module name="NoFinalizer"/>--> |
| <module name="SuperClone"/> |
| <module name="SuperFinalize"/> |
| <module name="OneStatementPerLine"/> |
| <module name="OverloadMethodsDeclarationOrder"/> |
| <module name="PackageDeclaration"/> |
| <module name="ParameterAssignment"/> |
| <module name="SimplifyBooleanExpression"/> |
| <module name="SimplifyBooleanReturn"/> |
| <module name="StringLiteralEquality"/> |
| <module name="UnnecessaryParentheses"/> |
| <module name="VariableDeclarationUsageDistance"/> |
| <!--Checks that classes that override equals() also override hashCode()--> |
| <module name="EqualsHashCode"/> |
| |
| <!-- Block Checks --> |
| <module name="EmptyBlock"/> |
| <module name="EmptyCatchBlock"> |
| <property name="exceptionVariableName" value="expected|ignore"/> |
| </module> |
| <module name="AvoidNestedBlocks"/> |
| <module name="NeedBraces"/> |
| <module name="LeftCurly"/> |
| <module name="RightCurly"/> |
| |
| <!-- Class Design --> |
| <module name="FinalClass"/> |
| <!--<module name="HideUtilityClassConstructor"/>--> |
| <module name="OneTopLevelClass"/> |
| <module name="InterfaceIsType"/> |
| <module name="InnerTypeLast"/> |
| <module name="VisibilityModifier"/> |
| <module name="MutableException"/> |
| <module name="ThrowsCount"/> |
| |
| <!-- Miscellaneous --> |
| <module name="ArrayTypeStyle"/> |
| <module name="UpperEll"/> |
| <module name="AvoidEscapedUnicodeCharacters"/> |
| <module name="DescendantToken"/> |
| <module name="FinalParameters"/> |
| <module name="Indentation"/> |
| <module name="OuterTypeFilename"/> |
| <module name="TodoComment"/> |
| <module name="TrailingComment"/> |
| |
| <!-- Javadoc Comments --> |
| <module name="AtclauseOrder"> |
| <property name="tagOrder" value="@param, @return, @throws, @deprecated"/> |
| </module> |
| <module name="NonEmptyAtclauseDescription"/> |
| <module name="JavadocParagraph"/> |
| <module name="JavadocStyle"/> |
| <module name="JavadocTagContinuationIndentation"/> |
| <module name="SingleLineJavadoc"/> |
| <module name="SummaryJavadoc"/> |
| <module name="JavadocMethod"> |
| <property name="scope" value="public"/> |
| <property name="allowedAnnotations" value="Override, Test, Before, After, BeforeClass, AfterClass, Parameterized, Parameters, BeforeEach, AfterEach, BeforeAll, AfterAll, ParameterizedTest, TestMethodOrder"/> |
| <property name="ignoreMethodNamesRegex" value="^assert.*$|^verify.*$"/> |
| <property name="tokens" value="METHOD_DEF, ANNOTATION_FIELD_DEF"/> |
| </module> |
| |
| <!-- Filters --> |
| <module name="SuppressionCommentFilter"/> |
| <module name="SuppressWithNearbyCommentFilter"/> |
| </module> |
| </module> |