<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd">
<module name="Checker">
  <module name="UniqueProperties"/>
  <module name="FileTabCharacter">
    <property name="eachLine" value="true"/>
  </module>
  <module name="LineLength">
    <property name="fileExtensions" value="java"/>
    <property name="max" value="240"/>
    <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
  </module>
  <module name="TreeWalker">
    <!--
      Annotations: https://checkstyle.sourceforge.io/config_annotation.html
    -->
    <module name="AnnotationUseStyle"/>
    <module name="MissingDeprecated"/>
    <module name="MissingOverride"/>
    <!--
      Class Design: https://checkstyle.sourceforge.io/config_design.html
    -->
    <module name="OneTopLevelClass"/>
    <!--
      Coding: https://checkstyle.sourceforge.io/config_coding.html
    -->
    <module name="ArrayTrailingComma"/>
    <module name="AvoidNoArgumentSuperConstructorCall"/>
    <module name="CovariantEquals"/>
    <module name="DefaultComesLast"/>
    <module name="EqualsHashCode"/>
    <module name="MissingSwitchDefault"/>
    <module name="NoEnumTrailingComma"/>
    <module name="OneStatementPerLine"/>
    <module name="PackageDeclaration"/>
    <module name="RequireThis"/>
    <module name="SimplifyBooleanExpression"/>
    <module name="StringLiteralEquality"/>
    <module name="SuperClone"/>
    <module name="SuperFinalize"/>
    <module name="UnnecessarySemicolonAfterOuterTypeDeclaration"/>
    <module name="UnnecessarySemicolonAfterTypeMemberDeclaration"/>
    <module name="UnnecessarySemicolonInEnumeration"/>
    <module name="UnnecessarySemicolonInTryWithResources"/>
    <module name="VariableDeclarationUsageDistance">
      <property name="allowedDistance" value="10"/>
    </module>
    <!--
      Imports: https://checkstyle.sourceforge.io/config_imports.html
    -->
    <module name="AvoidStarImport"/>
    <module name="CustomImportOrder">
      <property name="customImportOrderRules" value="STATIC###THIRD_PARTY_PACKAGE"/>
      <property name="sortImportsInGroupAlphabetically" value="true"/>
      <property name="separateLineBetweenGroups" value="true"/>
    </module>
    <module name="IllegalImport">
      <!-- prevent the use of jsr-305 annotations and Spring utilities -->
      <property name="illegalClasses" value="javax.annotation.MatchesPattern.Checker, javax.annotation.Nonnegative.Checker, javax.annotation.Nonnull.Checker, javax.annotation.RegEx.Checker, javax.annotation.CheckForNull, javax.annotation.CheckForSigned, javax.annotation.CheckReturnValue, javax.annotation.Detainted, javax.annotation.MatchesPattern, javax.annotation.Nonnegative, javax.annotation.Nonnull, javax.annotation.Nullable, javax.annotation.OverridingMethodsMustInvokeSuper, javax.annotation.ParametersAreNonnullByDefault, javax.annotation.ParametersAreNullableByDefault, javax.annotation.PropertyKey, javax.annotation.RegEx, javax.annotation.Signed, javax.annotation.Syntax, javax.annotation.Tainted, javax.annotation.Untainted, javax.annotation.WillClose, javax.annotation.WillCloseWhenClosed, javax.annotation.WillNotClose, javax.annotation.concurrent.GuardedBy, javax.annotation.concurrent.Immutable, javax.annotation.concurrent.NotThreadSafe, javax.annotation.concurrent.ThreadSafe, javax.annotation.meta.TypeQualifierValidator, javax.annotation.meta.When, javax.annotation.meta.Exclusive, javax.annotation.meta.Exhaustive, javax.annotation.meta.TypeQualifier, javax.annotation.meta.TypeQualifierDefault, javax.annotation.meta.TypeQualifierNickname, org.apache.log4j.Logger, org.springframework.util.Assert, org.springframework.util.StringUtils"/>
      <!-- Prevent the expansion of Guava usages and ban internal library packages -->
      <property name="illegalPkgs" value="com.google.common.base, com.google.common.eventbus, com.google.common.graph, com.google.common.hash, com.google.common.html, com.google.common.io, com.google.common.math, com.google.common.net, com.google.common.reflect, com.google.common.xml, com.google.thirdparty, jline.internal"/>
    </module>
    <module name="RedundantImport"/>
    <module name="UnusedImports"/>
    <!--
      Javadoc Comments: https://checkstyle.sourceforge.io/config_javadoc.html
    -->
    <module name="AtclauseOrder">
      <property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
    </module>
    <module name="InvalidJavadocPosition"/>
    <module name="JavadocMethod">
      <property name="allowedAnnotations" value="Override, Test"/>
      <property name="allowMissingParamTags" value="true"/>
      <property name="allowMissingReturnTag" value="true"/>
    </module>
    <module name="JavadocMissingWhitespaceAfterAsterisk"/>
    <module name="NonEmptyAtclauseDescription"/>
    <!--
      Miscellaneous: https://checkstyle.sourceforge.io/config_misc.html
    -->
    <module name="ArrayTypeStyle"/>
    <module name="OuterTypeFilename"/>
    <module name="UpperEll"/>
    <!--
      Modifiers: https://checkstyle.sourceforge.io/config_modifier.html
    -->
    <module name="ModifierOrder"/>
    <module name="RedundantModifier"/>
    <!--
      Regexp: https://checkstyle.sourceforge.io/config_regexp.html
    -->
    <module name="Regexp">
      <property name="format" value="[ \t]+$"/>
      <property name="illegalPattern" value="true"/>
      <property name="message" value="Trailing whitespace"/>
    </module>
    <!--
      Whitespace: https://checkstyle.sourceforge.io/config_whitespace.html
    -->
    <module name="EmptyLineSeparator">
      <property name="tokens" value="PACKAGE_DEF, IMPORT, STATIC_IMPORT, CLASS_DEF, INTERFACE_DEF, ENUM_DEF, STATIC_INIT, INSTANCE_INIT, METHOD_DEF, CTOR_DEF, VARIABLE_DEF, RECORD_DEF, COMPACT_CTOR_DEF"/>
      <property name="allowNoEmptyLineBetweenFields" value="true"/>
    </module>
    <module name="GenericWhitespace">
      <message key="ws.followed" value="GenericWhitespace ''{0}'' is followed by whitespace."/>
      <message key="ws.preceded" value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
      <message key="ws.illegalFollow" value="GenericWhitespace ''{0}'' should followed by whitespace."/>
      <message key="ws.notPreceded" value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
    </module>
    <module name="MethodParamPad">
      <property name="tokens" value="CTOR_DEF, LITERAL_NEW, METHOD_CALL, METHOD_DEF, SUPER_CTOR_CALL, ENUM_CONSTANT_DEF, RECORD_DEF"/>
    </module>
    <module name="NoLineWrap">
      <property name="tokens" value="PACKAGE_DEF, IMPORT, STATIC_IMPORT"/>
    </module>
    <module name="NoWhitespaceBefore">
      <property name="tokens" value="COMMA, SEMI, POST_INC, POST_DEC, DOT, LABELED_STAT, METHOD_REF"/>
      <property name="allowLineBreaks" value="true"/>
    </module>
    <module name="NoWhitespaceBeforeCaseDefaultColon"/>
    <module name="ParenPad">
      <property name="tokens" value="ANNOTATION, ANNOTATION_FIELD_DEF, CTOR_CALL, CTOR_DEF, DOT, ENUM_CONSTANT_DEF, EXPR, LITERAL_CATCH, LITERAL_DO, LITERAL_FOR, LITERAL_IF, LITERAL_NEW, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_WHILE, METHOD_CALL, METHOD_DEF, QUESTION, RESOURCE_SPECIFICATION, SUPER_CTOR_CALL, LAMBDA, RECORD_DEF"/>
    </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="SeparatorWrapMethodRef"/>
      <property name="tokens" value="METHOD_REF"/>
      <property name="option" value="nl"/>
    </module>
    <module name="WhitespaceAfter">
      <property name="tokens" value="COMMA, SEMI, TYPECAST, LITERAL_IF, LITERAL_ELSE, LITERAL_WHILE, LITERAL_DO, LITERAL_FOR, DO_WHILE"/>
    </module>
    <module name="WhitespaceAround">
      <property name="allowEmptyConstructors" value="true"/>
      <property name="allowEmptyLambdas" value="true"/>
      <property name="allowEmptyMethods" value="true"/>
      <property name="allowEmptyTypes" value="true"/>
      <property name="allowEmptyLoops" value="true"/>
      <property name="ignoreEnhancedForColon" value="false"/>
      <property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, DO_WHILE, EQUAL, GE, GT, LAMBDA, LAND, LCURLY, LE, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, LITERAL_ASSERT, TYPE_EXTENSION_AND"/>
      <message key="ws.notFollowed" value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
      <message key="ws.notPreceded" value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
    </module>
  </module>
</module>
