<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<!DOCTYPE module PUBLIC
    "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
    "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">

<!--
Checkstyle Configuration
Severity: EASY
-->
<module name="Checker">

    <!-- Checks whether files end with a new line.                        -->
    <!-- See http://checkstyle.sourceforge.net/config_misc.html#NewlineAtEndOfFile -->
    <module name="NewlineAtEndOfFile">
        <property name="severity" value="ignore" />
    </module>

    <!-- Checks that property files contain the same keys.         -->
    <!-- See http://checkstyle.sourceforge.net/config_misc.html#Translation -->
    <module name="Translation" />

    <!-- Checks for Size Violations.                    -->
    <!-- See http://checkstyle.sourceforge.net/config_sizes.html -->
    <module name="FileLength" />

    <!-- Checks for whitespace                               -->
    <!-- See http://checkstyle.sourceforge.net/config_whitespace.html -->
    <module name="FileTabCharacter">
        <property name="eachLine" value="true"/>
    </module>

    <!-- Miscellaneous other checks.                   -->
    <!-- See http://checkstyle.sourceforge.net/config_misc.html -->
    <module name="RegexpSingleline">
        <property name="format" value="\s+$" />
        <property name="minimum" value="0" />
        <property name="maximum" value="0" />
        <property name="message" value="Line has trailing spaces." />
        <property name="severity" value="info" />
    </module>

    <module name="TreeWalker">
        <!-- http://checkstyle.sourceforge.net/config_annotation.html -->
        <module name="AnnotationLocation" />

        <module name="AnonInnerLength">
          <property name="max" value="60"/>
        </module>

        <!-- Checks for Javadoc comments.                     -->
        <!-- See http://checkstyle.sourceforge.net/config_javadoc.html -->
        <module name="JavadocMethod">
            <property name="scope" value="package" />
            <property name="allowMissingParamTags" value="true" />
            <property name="allowMissingThrowsTags" value="true" />
            <property name="allowMissingReturnTag" value="true" />
            <property name="allowThrowsTagsForSubclasses" value="true" />
            <property name="allowUndeclaredRTE" value="true" />
            <property name="allowMissingPropertyJavadoc" value="true" />
            <property name="severity" value="ignore" />
        </module>
        <module name="JavadocType">
            <property name="scope" value="package" />
            <property name="severity" value="ignore" />
        </module>
        <module name="JavadocVariable">
            <property name="scope" value="package" />
            <property name="severity" value="ignore" />
        </module>
        <module name="JavadocStyle">
            <property name="checkEmptyJavadoc" value="true" />
            <property name="severity" value="ignore" />
        </module>

        <!-- Checks for Naming Conventions.                  -->
        <!-- See http://checkstyle.sourceforge.net/config_naming.html -->
        <module name="ConstantName" />
        <module name="LocalFinalVariableName" />
        <module name="LocalVariableName">
            <property name="allowOneCharVarInForLoop" value="true"/>
        </module>
        <module name="MemberName">
          <property name="format" value="^[a-z][a-zA-Z0-9][a-zA-Z0-9]*$"/>
        </module>
        <module name="MethodName" />
        <module name="PackageName">
            <property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
        </module>
        <module name="ParameterName">
            <property name="format" value="^[a-z][a-zA-Z0-9][a-zA-Z0-9]*$"/>
            <property name="accessModifiers" value="public"/>
        </module>
        <module name="StaticVariableName">
            <property name="format" value="^[a-z][a-zA-Z0-9][a-zA-Z0-9]*$"/>
        </module>
        <module name="TypeName" />

        <!-- Checks for imports                              -->
        <!-- See http://checkstyle.sourceforge.net/config_import.html -->
        <module name="AvoidStarImport" />
        <module name="IllegalImport" />
        <module name="RedundantImport" />
        <module name="UnusedImports" />


        <!-- Checks for Size Violations.                    -->
        <!-- See http://checkstyle.sourceforge.net/config_sizes.html -->
        <module name="LineLength">
            <property name="severity" value="ignore" />
        </module>
        <module name="MethodLength" />
        <module name="ParameterNumber" />


        <!-- Checks for whitespace                               -->
        <!-- See http://checkstyle.sourceforge.net/config_whitespace.html -->
        <module name="EmptyForIteratorPad" />
        <module name="EmptyLineSeparator">
            <property name="allowNoEmptyLineBetweenFields" value="true"/>
        </module>
        <module name="GenericWhitespace" />
        <module name="MethodParamPad" />
        <module name="NoLineWrap"/>
        <module name="NoWhitespaceAfter">
          <property name="tokens" value="ARRAY_INIT"/>
          <property name="tokens" value="BNOT"/>
          <property name="tokens" value="DEC"/>
          <property name="tokens" value="DOT"/>
          <property name="tokens" value="INC"/>
          <property name="tokens" value="LNOT"/>
          <property name="tokens" value="UNARY_MINUS"/>
          <property name="tokens" value="UNARY_PLUS"/>
          <property name="tokens" value="ARRAY_DECLARATOR"/>
        </module>
        <module name="NoWhitespaceBefore"/>
        <module name="SeparatorWrap">
            <property name="tokens" value="COMMA"/>
            <property name="option" value="eol"/>
        </module>
        <module name="SeparatorWrap">
            <property name="tokens" value="DOT"/>
            <property name="option" value="nl"/>
        </module>
        <module name="SingleSpaceSeparator"/>
        <module name="OperatorWrap" />
        <module name="ParenPad" />
        <module name="TypecastParenPad" />
        <module name="WhitespaceAfter" />
        <module name="WhitespaceAround">
          <property name="allowEmptyLambdas" value="true" />
        </module>

        <!-- Modifier Checks                                    -->
        <!-- See http://checkstyle.sourceforge.net/config_modifiers.html -->
        <module name="ModifierOrder">
            <property name="severity" value="ignore" />
        </module>
        <module name="RedundantModifier">
            <property name="severity" value="ignore" />
        </module>


        <!-- Checks for blocks. You know, those {}'s         -->
        <!-- See http://checkstyle.sourceforge.net/config_blocks.html -->
        <module name="AvoidNestedBlocks">
          <property name="allowInSwitchCase" value="true" />
        </module>
        <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" />


        <!-- Checks for common coding problems               -->
        <!-- See http://checkstyle.sourceforge.net/config_coding.html -->
        <module name="ArrayTrailingComma"/>
        <module name="CovariantEquals"/>
        <module name="DeclarationOrder"/>
        <module name="DefaultComesLast"/>
        <module name="EmptyStatement" />
        <module name="EqualsAvoidNull"/>
        <module name="EqualsHashCode" />
        <module name="FallThrough"/>
        <module name="HiddenField">
          <property name="ignoreConstructorParameter" value="true"/>
          <property name="ignoreSetter" value="true"/>
        </module>
        <module name="IllegalCatch"/>
        <module name="IllegalInstantiation">
          <property name="classes" value="java.lang.Boolean"/>
        </module>
        <module name="IllegalThrows"/>
        <module name="IllegalType"/>
        <module name="InnerAssignment" />
        <module name="MagicNumber">
            <property name="severity" value="ignore" />
            <property name="ignoreNumbers" value="-1, 0, 1, 2, 3, 4, 5, 8, 10, 12, 16, 24, 30, 32, 60, 64, 100, 120, 128, 180, 256, 360, 1000" />
        </module>
        <module name="MissingSwitchDefault" />
        <module name="MultipleStringLiterals">
          <property name="allowedDuplicates" value="2"/>
          <property name="ignoreStringsRegexp" value='^(("")|(", "))$'/>
        </module>
        <module name="MultipleVariableDeclarations"/>
        <module name="NestedForDepth">
            <property name="max" value="2"/>
        </module>
        <module name="NoClone"/>
        <module name="NoFinalizer"/>
        <module name="OneStatementPerLine"/>
        <module name="PackageDeclaration"/>
        <module name="ParameterAssignment"/>
        <module name="RequireThis"/>
        <module name="SimplifyBooleanExpression" />
        <module name="SimplifyBooleanReturn" />
        <module name="StringLiteralEquality"/>


        <!-- Checks for class design                         -->
        <!-- See http://checkstyle.sourceforge.net/config_design.html -->
        <module name="HideUtilityClassConstructor" />
        <module name="InnerTypeLast"/>
        <module name="InterfaceIsType" />
        <module name="OneTopLevelClass"/>
        <module name="VisibilityModifier">
            <property name="severity" value="ignore" />
        </module>


        <!-- Miscellaneous other checks.                   -->
        <!-- See http://checkstyle.sourceforge.net/config_misc.html -->
        <module name="ArrayTypeStyle" />
        <module name="CommentsIndentation"/>
        <module name="OuterTypeFilename"/>
        <module name="TodoComment">
            <property name="format" value="(?i)\s+TODO\s+" />
            <property name="severity" value="info" />
        </module>
        <module name="TodoComment">
            <property name="format" value="(?i)\s+CR\s+" />
            <property name="severity" value="info" />
        </module>
        <module name="UpperEll" />



    </module>

    <!-- Enable suppression comments -->
    <module name="SuppressionCommentFilter">
        <property name="offCommentFormat" value="CHECKSTYLE IGNORE\s+(\S+)" />
        <property name="onCommentFormat" value="CHECKSTYLE END IGNORE\s+(\S+)" />
        <property name="checkFormat" value="$1" />
    </module>
    <module name="SuppressWithNearbyCommentFilter">
        <property name="commentFormat" value="SUPPRESS CHECKSTYLE (\w+)" />
        <property name="checkFormat" value="$1" />
        <property name="influenceFormat" value="1" />
    </module>

</module>
