HolographicDisplays/checkstyle/checkstyle.xml
2021-08-13 21:33:08 +02:00

198 lines
7.8 KiB
XML

<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="fileExtensions" value="java, xml"/>
<property name="charset" value="UTF-8"/>
<property name="severity" value="warning"/>
<module name="SuppressionFilter">
<property name="file" value="${samedir}/suppressions.xml"/>
</module>
<!-- Check that Java source files have the correct header -->
<module name="Header">
<property name="severity" value="error"/>
<property name="fileExtensions" value="java"/>
<property name="headerFile" value="${samedir}/header.txt"/>
</module>
<!-- Check that files don't contain tabs -->
<module name="FileTabCharacter">
<property name="severity" value="error"/>
<property name="eachLine" value="true"/>
</module>
<!-- Limit maximum lines in a single file -->
<module name="FileLength">
<property name="fileExtensions" value="java"/>
<property name="max" value="600"/>
</module>
<!-- Limit maximum line length for readability -->
<module name="LineLength">
<property name="fileExtensions" value="java"/>
<property name="max" value="140"/>
<property name="ignorePattern" value="^package.*|^import.*"/>
</module>
<module name="TreeWalker">
<!-- Blocks -->
<module name="AvoidNestedBlocks"/>
<module name="EmptyBlock">
<property name="option" value="text"/>
</module>
<module name="EmptyCatchBlock">
<property name="exceptionVariableName" value="expected|ignore"/>
</module>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="RightCurly"/>
<!-- Class design -->
<module name="InterfaceIsType"/>
<module name="MutableException"/>
<module name="OneTopLevelClass"/>
<module name="ThrowsCount"/>
<!-- Coding -->
<module name="AvoidDoubleBraceInitialization"/>
<module name="AvoidNoArgumentSuperConstructorCall"/>
<module name="CovariantEquals"/>
<module name="DeclarationOrder">
<property name="ignoreConstructors" value="true"/>
</module>
<module name="DefaultComesLast"/>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<module name="FallThrough"/>
<module name="IllegalToken"/>
<module name="InnerAssignment"/>
<module name="MissingSwitchDefault"/>
<module name="NestedForDepth">
<property name="max" value="3"/>
</module>
<module name="NestedIfDepth">
<property name="max" value="3"/>
</module>
<module name="NestedTryDepth">
<property name="max" value="2"/>
</module>
<module name="NoFinalizer"/>
<module name="OneStatementPerLine"/>
<module name="PackageDeclaration"/>
<module name="RequireThis"/>
<module name="SimplifyBooleanExpression"/>
<module name="StringLiteralEquality"/>
<module name="UnnecessaryParentheses">
<property name="tokens" value="EXPR, IDENT, NUM_DOUBLE, NUM_FLOAT, NUM_INT, NUM_LONG, STRING_LITERAL,
LITERAL_NULL, LITERAL_FALSE, LITERAL_TRUE, ASSIGN, BAND_ASSIGN, BOR_ASSIGN, BSR_ASSIGN,
BXOR_ASSIGN, DIV_ASSIGN, MINUS_ASSIGN, MOD_ASSIGN, PLUS_ASSIGN, SL_ASSIGN, SR_ASSIGN,
STAR_ASSIGN"/>
</module>
<module name="UnnecessarySemicolonAfterOuterTypeDeclaration"/>
<module name="UnnecessarySemicolonAfterTypeMemberDeclaration"/>
<module name="UnnecessarySemicolonInTryWithResources"/>
<!-- Imports -->
<module name="AvoidStarImport"/>
<module name="AvoidStaticImport"/>
<module name="IllegalImport">
<property name="illegalPkgs" value="sun"/>
<property name="illegalClasses" value="
com.google.common.base.Optional,
com.google.common.base.Function,
com.google.common.base.Supplier"/>
</module>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<!-- Javadoc -->
<module name="AtclauseOrder"/>
<module name="InvalidJavadocPosition"/>
<module name="JavadocBlockTagLocation"/>
<module name="JavadocContentLocation"/>
<module name="JavadocMissingLeadingAsterisk"/>
<module name="JavadocMissingWhitespaceAfterAsterisk"/>
<module name="JavadocStyle"/>
<module name="JavadocTagContinuationIndentation"/>
<module name="NonEmptyAtclauseDescription"/>
<module name="RequireEmptyLineBeforeBlockTagGroup"/>
<module name="SingleLineJavadoc"/>
<module name="SummaryJavadoc"/>
<!-- Miscellaneous -->
<module name="ArrayTypeStyle"/>
<module name="AvoidEscapedUnicodeCharacters"/>
<module name="CommentsIndentation"/>
<module name="Indentation">
<property name="basicOffset" value="4"/>
<property name="braceAdjustment" value="0"/>
<property name="caseIndent" value="4"/>
<property name="throwsIndent" value="8"/>
<property name="lineWrappingIndentation" value="8"/>
<property name="arrayInitIndent" value="4"/>
</module>
<module name="OuterTypeFilename"/>
<module name="UpperEll"/>
<!-- Modifiers -->
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>
<!-- Naming -->
<module name="ClassTypeParameterName"/>
<module name="IllegalIdentifierName"/>
<module name="InterfaceTypeParameterName"/>
<module name="MethodTypeParameterName"/>
<module name="LambdaParameterName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<!-- Size -->
<module name="MethodCount"/>
<module name="OuterTypeNumber"/>
<module name="ParameterNumber"/>
<!-- Whitespace -->
<module name="RegexpSinglelineJava">
<property name="format" value="\s+$"/>
<property name="minimum" value="0"/>
<property name="maximum" value="0"/>
<property name="ignoreComments" value="true"/>
<property name="message" value="Line has trailing spaces."/>
</module>
<module name="EmptyForInitializerPad"/>
<module name="EmptyForIteratorPad"/>
<module name="EmptyLineSeparator">
<property name="allowNoEmptyLineBetweenFields" value="true"/>
<property name="tokens" value="IMPORT, STATIC_IMPORT, CLASS_DEF, INTERFACE_DEF, ENUM_DEF, STATIC_INIT,
INSTANCE_INIT, METHOD_DEF, CTOR_DEF"/>
</module>
<module name="GenericWhitespace"/>
<module name="MethodParamPad"/>
<module name="NoLineWrap"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap"/>
<module name="ParenPad"/>
<module name="SingleSpaceSeparator"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyMethods" value="true"/>
<property name="allowEmptyTypes" value="true"/>
<property name="allowEmptyLoops" value="true"/>
<property name="allowEmptyLambdas" value="true"/>
<property name="allowEmptyCatches" value="true"/>
<property name="ignoreEnhancedForColon" value="false"/>
</module>
</module>
</module>