.codingstyle.5.2.0.source-code.checkstyle-tests-configuration.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codingstyle Show documentation
Show all versions of codingstyle Show documentation
Provides all necessary resources for a Java project to enforce the coding style that I am using
in my lectures about software development at Munich University of Applied Sciences and in all of my
open source projects. It configures several static analysis tools for Maven and IntelliJ. Moreover,
it provides some sample classes that already use this style guide. This classes can be used as such but are not
required in this project. These classes also use some additional libraries that are included using the Maven
dependency mechanism. If the sample classes are deleted then the dependencies can be safely deleted, too.
<?xml version="1.0" encoding="UTF-8"?> <!-- Checkstyle-Configuration: Ullrich Hafner Description: Ullrich Hafner's Checkstyle Rules. --> <!-- ${project.groupId}:${project.artifactId}:${project.version} --> <!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"/> <module name="RegexpMultiline"> <property name="format" value="\{\s*(\n|\r\n)\s*(\n|\r\n)"/> <property name="message" value="No empty lines after opening curly braces allowed" /> </module> <module name="RegexpMultiline"> <property name="format" value="(\n|\r\n)\s*(\n|\r\n)\s*\}"/> <property name="message" value="No empty lines before closing curly braces allowed" /> </module> <module name="TreeWalker"> <module name="SuppressWarningsHolder" /> <module name="NoWhitespaceBeforeCaseDefaultColon"/> <module name="UnnecessarySemicolonAfterOuterTypeDeclaration"/> <module name="UnnecessarySemicolonInTryWithResources"/> <module name="UnnecessarySemicolonInEnumeration"/> <module name="AvoidDoubleBraceInitialization"/> <module name="NoEnumTrailingComma"/> <module name="OneStatementPerLine"/> <module name="OuterTypeFilename"/> <module name="NestedForDepth"> <property name="max" value="2"/> </module> <module name="InnerTypeLast"/> <module name="AnnotationUseStyle"/> <module name="Indentation"> <property name="arrayInitIndent" value="8"/> <property name="lineWrappingIndentation" value="8"/> </module> <module name="MissingDeprecated"/> <module name="PackageAnnotation"/> <module name="EqualsAvoidNull"/> <module name="GenericWhitespace"/> <module name="JavadocStyle"> <property name="severity" value="warning"/> <property name="checkEmptyJavadoc" value="true"/> </module> <module name="JavadocType"/> <module name="JavadocMethod"/> <module name="JavadocParagraph"/> <module name="JavadocVariable"> <property name="scope" value="protected"/> <property name="tokens" value="VARIABLE_DEF"/> </module> <module name="MissingJavadocMethodCheck"> <property name="allowMissingPropertyJavadoc" value="true"/> <property name="ignoreMethodNamesRegex" value="size|isEmpty|isNotEmpty"/> </module> <module name="MissingJavadocTypeCheck"/> <module name="MissingJavadocPackageCheck"/> <module name="JavadocMissingLeadingAsteriskCheck"/> <module name="JavadocMissingWhitespaceAfterAsteriskCheck"/> <module name="JavadocContentLocationCheck"/> <module name="JavadocBlockTagLocation"/> <module name="InvalidJavadocPosition"/> <module name="ConstantName"/> <module name="LocalFinalVariableName"/> <module name="LocalVariableName"/> <module name="MemberName"/> <module name="MethodName"/> <module name="PackageName"/> <module name="ParameterName"/> <module name="StaticVariableName"/> <module name="LambdaParameterName"/> <module name="TypeName"/> <module name="ClassTypeParameterName"/> <module name="MethodTypeParameterName"/> <module name="AnonInnerLength"> <property name="max" value="10"/> </module> <module name="LambdaBodyLength"> <property name="max" value="10"/> </module> <module name="MethodLength"/> <module name="ParameterNumber"> <property name="ignoreOverriddenMethods" value="true"/> </module> <module name="EmptyForIteratorPad"/> <module name="EmptyLineSeparator"> <property name="allowMultipleEmptyLines" value="false"/> <property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/> <property name="allowNoEmptyLineBetweenFields" value="true"/> </module> <module name="NoWhitespaceAfter"> <property name="tokens" value="ARRAY_INIT,BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/> </module> <module name="NoWhitespaceBefore"/> <module name="OperatorWrap"/> <module name="TypecastParenPad"> <property name="tokens" value="RPAREN,TYPECAST"/> </module> <module name="WhitespaceAfter"> <property name="tokens" value="COMMA,SEMI"/> </module> <module name="WhitespaceAround"> <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LCURLY,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND"/> </module> <module name="ParenPad"/> <module name="MethodParamPad"/> <module name="ModifierOrder"/> <module name="RedundantModifier"/> <module name="AvoidNestedBlocks"/> <module name="EmptyBlock"> <property name="option" value="text"/> <property name="tokens" value="LITERAL_CATCH"/> </module> <module name="EmptyBlock"> <property name="tokens" value="LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_IF,LITERAL_FOR,LITERAL_TRY,LITERAL_WHILE,STATIC_INIT"/> </module> <module name="LeftCurly"/> <module name="NeedBraces"/> <module name="RightCurly"> <property name="option" value="alone"/> </module> <module name="CovariantEquals"/> <module name="DefaultComesLast"/> <module name="EmptyStatement"/> <module name="EqualsHashCode"/> <module name="FallThrough"/> <module name="HiddenField"> <property name="ignoreConstructorParameter" value="true"/> <property name="ignoreSetter" value="true"/> <property name="ignoreAbstractMethods" value="true"/> <property name="setterCanReturnItsClass" value="true"/> </module> <module name="IllegalThrows"/> <module name="InnerAssignment"/> <module name="ModifiedControlVariable"/> <module name="MultipleVariableDeclarations"/> <module name="NestedTryDepth"/> <module name="NestedIfDepth"> <property name="max" value="2"/> </module> <module name="PackageDeclaration"/> <module name="ParameterAssignment"/> <module name="SimplifyBooleanExpression"/> <module name="SimplifyBooleanReturn"/> <module name="StringLiteralEquality"/> <module name="SuperClone"/> <module name="SuperFinalize"/> <module name="InterfaceIsType"/> <module name="MutableException"/> <module name="ThrowsCount"> <property name="max" value="3"/> </module> <module name="VisibilityModifier"/> <module name="BooleanExpressionComplexity"/> <module name="ClassDataAbstractionCoupling"> <property name="max" value="10"/> </module> <module name="ClassFanOutComplexity"> <property name="max" value="25"/> </module> <module name="JavaNCSS"/> <module name="ArrayTypeStyle"/> <module name="UpperEll"/> <module name="IllegalCatch"/> <module name="IllegalImport"> <property name="illegalPkgs" value="net.jcip.annotations"/> <property name="illegalClasses" value="edu.umd.cs.findbugs.annotations.Nullable, javax.annotation.Nullable, javax.annotation.CheckForNull, javax.annotation.Nonnull"/> <property name="severity" value="error"/> </module> </module> <module name="FileTabCharacter"> <property name="fileExtensions" value="jelly, java"/> </module> <module name="FileLength"> <property name="fileExtensions" value="jelly, java"/> </module> <module name="SuppressWarningsFilter" /> </module>