333 lines
9.5 KiB
XML
333 lines
9.5 KiB
XML
|
<?xml version="1.0"?>
|
||
|
<!DOCTYPE module PUBLIC
|
||
|
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
|
||
|
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
|
||
|
<!--
|
||
|
SPDX-FileCopyrightText: The openTCS Authors
|
||
|
SPDX-License-Identifier: CC0-1.0
|
||
|
-->
|
||
|
|
||
|
<!-- See http://checkstyle.sourceforge.net/checks.html for all checks + descriptions. -->
|
||
|
<module name="Checker">
|
||
|
|
||
|
<!-- For tests and configuration interfaces, we allow missing method JavaDoc documentation. -->
|
||
|
<module name="SuppressionSingleFilter">
|
||
|
<property name="checks" value="MissingJavadocMethod"/>
|
||
|
<property name="files" value=".*Test.java|.*Configuration.java"/>
|
||
|
</module>
|
||
|
|
||
|
<!-- For tests, we allow missing constructors, as we have @BeforeClass and @BeforeEach there. -->
|
||
|
<module name="SuppressionSingleFilter">
|
||
|
<property name="checks" value="MissingCtor"/>
|
||
|
<property name="files" value=".*Test.java"/>
|
||
|
</module>
|
||
|
|
||
|
<!-- For thirdparty packages and for package info files we allow the license header to differ. -->
|
||
|
<module name="SuppressionSingleFilter">
|
||
|
<property name="checks" value="Header"/>
|
||
|
<property name="files" value=".*[/\\]org[/\\]opentcs[/\\]thirdparty[/\\].*|.*[/\\]package-info.java"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="SuppressWithPlainTextCommentFilter">
|
||
|
<property name="offCommentFormat" value="// CHECKSTYLE:OFF.*"/>
|
||
|
<property name="onCommentFormat" value="// CHECKSTYLE:ON"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="SuppressWarningsFilter"/>
|
||
|
|
||
|
<property name="severity" value="warning"/>
|
||
|
|
||
|
<property name="fileExtensions" value="java, properties"/>
|
||
|
|
||
|
<module name="FileLength">
|
||
|
<property name="max" value="2000"/>
|
||
|
<property name="severity" value="warning"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="FileTabCharacter">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="LineLength">
|
||
|
<property name="max" value="100"/>
|
||
|
<property name="ignorePattern" value="(^(package|import) .*)|(^ *\* *[^ ]+$)|(GEN-FIRST:)"/>
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="NewlineAtEndOfFile">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<!-- Checks that property files contain the same keys. -->
|
||
|
<module name="Translation">
|
||
|
<property name="fileExtensions" value="properties"/>
|
||
|
<property name="baseName" value="^Bundle.*$"/>
|
||
|
<property name="severity" value="ignore"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="TreeWalker">
|
||
|
|
||
|
<module name="SuppressionCommentFilter">
|
||
|
<property name="offCommentFormat" value="// CHECKSTYLE:OFF.*"/>
|
||
|
<property name="onCommentFormat" value="// CHECKSTYLE:ON"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="SuppressWarningsHolder"/>
|
||
|
|
||
|
<module name="IllegalImport">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="UnusedImports">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="RedundantImport">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<!-- Checks for Naming Conventions. -->
|
||
|
<module name="LocalVariableName">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
<module name="LocalFinalVariableName">
|
||
|
<property name="severity" value="warning"/>
|
||
|
</module>
|
||
|
<module name="StaticVariableName">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
<module name="ConstantName">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
<module name="ParameterName">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
<module name="MemberName">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
<module name="MethodName">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
<module name="PackageName">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
<module name="TypeName">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="HiddenField">
|
||
|
<property name="tokens" value="VARIABLE_DEF, LAMBDA"/>
|
||
|
<property name="severity" value="warning"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="NeedBraces">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="CovariantEquals">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="EmptyStatement">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="InnerAssignment">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="MissingSwitchDefault">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="DefaultComesLast">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="FallThrough">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="ModifiedControlVariable">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="SimplifyBooleanExpression">
|
||
|
<property name="severity" value="warning"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="SimplifyBooleanReturn">
|
||
|
<property name="severity" value="warning"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="StringLiteralEquality">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="NestedTryDepth">
|
||
|
<property name="severity" value="warning"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="PackageDeclaration">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="ParameterAssignment">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="MultipleVariableDeclarations">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="HideUtilityClassConstructor">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="MutableException">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="InnerTypeLast">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="UpperEll">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="ArrayTypeStyle">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="AvoidStarImport">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="MethodLength">
|
||
|
<property name="severity" value="warning"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="AnonInnerLength">
|
||
|
<property name="severity" value="warning"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="ParameterNumber">
|
||
|
<property name="ignoreOverriddenMethods" value="true"/>
|
||
|
<property name="severity" value="warning"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="EqualsHashCode">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="NestedIfDepth">
|
||
|
<property name="max" value="2"/>
|
||
|
<property name="severity" value="warning"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="DeclarationOrder">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="IllegalCatch">
|
||
|
<property name="severity" value="warning"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="IllegalThrows">
|
||
|
<property name="severity" value="warning"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="IllegalType">
|
||
|
<property name="tokens" value="PARAMETER_DEF, METHOD_DEF"/>
|
||
|
<property name="severity" value="warning"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="VisibilityModifier">
|
||
|
<property name="protectedAllowed" value="true"/>
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<!-- Checks for Javadoc comments. -->
|
||
|
<module name="JavadocType">
|
||
|
<property name="scope" value="package"/>
|
||
|
<property name="severity" value="warning"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="JavadocMethod">
|
||
|
<property name="accessModifiers" value="public, protected"/>
|
||
|
<property name="severity" value="warning"/>
|
||
|
</module>
|
||
|
<module name="JavadocMethod">
|
||
|
<property name="accessModifiers" value="package"/>
|
||
|
<property name="severity" value="info"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="JavadocVariable">
|
||
|
<property name="scope" value="public"/>
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="JavadocStyle">
|
||
|
<property name="checkEmptyJavadoc" value="true"/>
|
||
|
<property name="severity" value="info"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="MissingJavadocMethod">
|
||
|
<property name="scope" value="public"/>
|
||
|
<property name="allowMissingPropertyJavadoc" value="true"/>
|
||
|
<property name="severity" value="warning"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="ModifierOrder">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="RedundantModifier">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="EmptyBlock">
|
||
|
<property name="severity" value="info"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="ExplicitInitialization">
|
||
|
<property name="severity" value="info"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="UnnecessaryParentheses">
|
||
|
<property name="severity" value="info"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="AvoidNestedBlocks">
|
||
|
<property name="severity" value="warning"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="SuperClone">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="RegexpSinglelineJava">
|
||
|
<property name="format" value="\S\s+$"/>
|
||
|
<property name="message" value="Line has trailing spaces."/>
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="MissingCtor">
|
||
|
<property name="severity" value="error"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="TodoComment">
|
||
|
<property name="format" value="TODO|XXX"/>
|
||
|
<property name="severity" value="info"/>
|
||
|
</module>
|
||
|
|
||
|
<module name="TrailingComment">
|
||
|
<!-- Trailing comments are often seen in NetBeans' generated GUI code. -->
|
||
|
<property name="severity" value="ignore"/>
|
||
|
</module>
|
||
|
|
||
|
</module>
|
||
|
|
||
|
</module>
|