<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
        "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
    <!-- Language Settings -->
    <property name="localeCountry" value="EN"/>
    <property name="localeLanguage" value="en"/>

    <module name="SuppressionSingleFilter"> <!-- Skip license check for package-info.java files -->
        <property name="checks" value="RegexpHeader"/>
        <property name="files" value="package-info.java"/>
    </module>
    <module name="RegexpHeader"> <!-- License check -->
        <property name="headerFile" value="${config_loc}/java.header"/>
    </module>
    <module name="FileLength">
        <!-- This value is alright. Notable: SessionQueries 808 -->
        <property name="max" value="1000"/>
        <property name="fileExtensions" value=".java"/>
    </module>
    <module name="LineLength">
        <!-- This value is very high. Notable: ExtensionExtractor: 254, DeepHelpLang 345, WorldMap 2964 -->
        <property name="max" value="3000"/>
    </module>

    <module name="TreeWalker">
        <module name="SuppressionCommentFilter">
            <property name="offCommentFormat" value="Checkstyle.OFF\: ([\w\|]+)"/>
            <property name="onCommentFormat" value="Checkstyle.ON\: ([\w\|]+)"/>
            <property name="checkFormat" value="$1"/>
        </module>

        <module name="EmptyStatement"/>

        <!-- Length restriction -->
        <module name="AnonInnerLength">
            <property name="max" value="50"/>
        </module>

        <module name="MethodLength">
            <!-- This value is high. Notable: InspectPage: 138 -->
            <property name="max" value="150"/>
        </module>

        <!-- Java Style -->
        <module name="ArrayTypeStyle"/>
        <module name="AvoidNestedBlocks"/>
        <module name="DefaultComesLast"> <!-- Switches -->
            <property name="skipIfLastAndSharedWithCase" value="true"/>
        </module>
        <module name="FallThrough"/> <!-- Switches -->
        <module name="EmptyForIteratorPad"/>
        <module name="GenericWhitespace"/>
        <module name="InnerAssignment"/>
        <module name="MissingOverride"/>
        <module name="NestedTryDepth">
            <property name="max" value="1"/>
        </module>
        <module name="UnnecessaryParentheses"/>
        <module name="NoWhitespaceAfter"/>

        <!-- Variable naming -->
        <module name="CatchParameterName"/>
        <module name="ClassTypeParameterName"/>
        <module name="InterfaceTypeParameterName"/>
        <module name="LocalVariableName"/>
        <module name="MethodTypeParameterName"/>
        <module name="LambdaParameterName"/>

        <!-- Metrics -->
        <module name="ClassFanOutComplexity">
            <!-- This value is high. Notable: SQLDB: 66 -->
            <property name="max" value="70"/>
        </module>
        <module name="CyclomaticComplexity">
            <!-- This value is high. Notable: ThemeConfig: 16 -->
            <property name="max" value="17"/>
        </module>

        <!-- Bugs -->
        <module name="CovariantEquals"/>
        <module name="EqualsAvoidNull"/>
        <module name="EmptyCatchBlock">
            <property name="exceptionVariableName" value="expected|ignore"/>
        </module>
        <module name="EmptyStatement"/>
        <module name="IllegalThrows"/>
        <module name="PackageAnnotation"/>

        <!-- Performance-->
        <module name="IllegalInstantiation">
            <property name="classes" value="java.lang.Boolean"/>
        </module>
    </module>

</module>
