eckstyle.checkstyle-config.2.0.0.source-code.checkstyle.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of checkstyle-config Show documentation
Show all versions of checkstyle-config Show documentation
A checkstyle configuration shared by multiple projects
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> <module name="Checker"> <property name="severity" value="warning"/> <property name="haltOnException" value="false"/> <module name="FileTabCharacter"> <property name="eachLine" value="true"/> </module> <module name="NewlineAtEndOfFile"/> <module name="UniqueProperties"/> <module name="TreeWalker"> <!-- Tabs and indents --> <property name="tabWidth" value="4"/> <module name="Indentation"> <property name="basicOffset" value="4"/> <property name="braceAdjustment" value="0"/> <property name="caseIndent" value="0"/> <property name="arrayInitIndent" value="8"/> </module> <!-- Spaces --> <module name="WhitespaceAround"> <property name="allowEmptyConstructors" value="true"/> <property name="allowEmptyMethods" value="true"/> <property name="allowEmptyTypes" value="true"/> </module> <module name="WhitespaceAfter"/> <module name="NoWhitespaceBefore"> <property name="tokens" value="COMMA, SEMI, POST_INC, POST_DEC"/> </module> <module name="ParenPad"/> <module name="TypecastParenPad"/> <module name="MethodParamPad"/> <module name="GenericWhitespace"/> <module name="EmptyLineSeparator"> <property name="allowNoEmptyLineBetweenFields" value="true"/> <property name="allowMultipleEmptyLines" value="false"/> <property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/> <property name="tokens" value="PACKAGE_DEF, IMPORT, CLASS_DEF, INTERFACE_DEF, ENUM_DEF, STATIC_INIT, INSTANCE_INIT, METHOD_DEF, CTOR_DEF"/> </module> <!-- Wrapping and braces --> <module name="LineLength"> <property name="max" value="121"/> <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/> </module> <module name="NoLineWrap"/> <module name="OperatorWrap"/> <!-- Blocks --> <module name="AvoidNestedBlocks"/> <module name="EmptyBlock"> <property name="tokens" value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/> <property name="option" value="TEXT"/> </module> <module name="LeftCurly"/> <module name="NeedBraces"/> <module name="RightCurly"/> <module name="RightCurly"> <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT, INSTANCE_INIT"/> <property name="option" value="alone"/> </module> <!-- Coding --> <module name="ArrayTrailingComma"/> <module name="CovariantEquals"/> <module name="DeclarationOrder"/> <module name="DefaultComesLast"/> <module name="EmptyStatement"/> <module name="EqualsHashCode"/> <module name="FallThrough"/> <module name="IllegalCatch"/> <!-- Forbids labels, break down method instead --> <module name="IllegalToken"/> <module name="IllegalTokenText"> <property name="message" value="Avoid using corresponding octal or Unicode escape."/> <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/> <property name="format" value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/> </module> <module name="InnerAssignment"/> <!-- MultipleStringLiterals is also a good check, but it breaks on many test files, which is annoying --> <module name="MultipleVariableDeclarations"/> <module name="NestedForDepth"> <property name="max" value="3"/> </module> <module name="NestedIfDepth"> <property name="max" value="3"/> </module> <module name="NestedTryDepth"/> <module name="NoFinalizer"/> <module name="OneStatementPerLine"/> <module name="StringLiteralEquality"/> <!-- VariableDeclarationUsageDistance seemed interesting, but also counts between initialization and usage --> <!-- Modifiers --> <module name="ModifierOrder"/> <module name="RedundantModifier"/> <!-- Imports --> <module name="AvoidStarImport"> <property name="allowClassImports" value="false"/> <property name="allowStaticMemberImports" value="false"/> <property name="excludes" value="java.io,java.net,java.lang.Math,javafx.scene.control"/> </module> <module name="RedundantImport"/> <module name="UnusedImports"/> <!-- Class design --> <module name="InterfaceIsType"/> <module name="OneTopLevelClass"/> <!-- Metrics & Size violations --> <module name="AnonInnerLength"/> <module name="BooleanExpressionComplexity"/> <!-- CyclomaticComplexity, ExecutableStatementCount, JavaNCSS are interesting metrics, but in some rare cases we need to exceed the limits, so we can't keep these checks --> <!-- Annotations --> <module name="MissingOverride"/> <module name="MissingDeprecated"/> <module name="PackageAnnotation"/> <!-- Miscellaneous --> <module name="ArrayTypeStyle"/> <module name="UpperEll"/> <!-- Naming conventions --> <module name="PackageName"> <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/> </module> <module name="OuterTypeFilename"/> <module name="TypeName"/> <module name="MemberName"> <property name="format" value="^[a-z][a-zA-Z0-9]*$"/> </module> <module name="MethodName"> <property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/> </module> <module name="ParameterName"> <property name="format" value="^[a-z][a-zA-Z0-9]*$"/> </module> <module name="MethodTypeParameterName"> <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/> </module> <module name="LocalVariableName"> <property name="tokens" value="VARIABLE_DEF"/> <property name="format" value="^[a-z][a-zA-Z0-9]*$"/> </module> <module name="ClassTypeParameterName"> <property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/> </module> <!-- Javadoc --> <module name="AtclauseOrder"> <property name="tagOrder" value="@param, @return, @throws, @exception, @see, @author, @version, @since, @serial, @serialField, @serialData, @deprecated"/> <property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/> </module> <module name="JavadocMethod"> <property name="scope" value="public"/> <property name="allowedAnnotations" value="Override,FXML"/> <property name="allowThrowsTagsForSubclasses" value="true"/> <property name="allowMissingParamTags" value="false"/> <property name="allowMissingReturnTag" value="true"/> <property name="allowMissingThrowsTags" value="false"/> <property name="allowMissingJavadoc" value="true"/> <!-- For JavaFX property getters --> <property name="ignoreMethodNamesRegex" value=".*Property"/> </module> <module name="NonEmptyAtclauseDescription"/> </module> <!-- Unmaintainable Javadoc tags --> <module name="RegexpSingleline"> <property name="format" value="@author"/> <property name="ignoreCase" value="true"/> <property name="message" value="unmaintainable Javadoc tag @author, please rely on version control"/> </module> </module>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy