<?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="charset" value="UTF-8"/>
    <property name="haltOnException" value="false"/>

    <!-- Hard coded until https://issues.apache.org/jira/browse/MCHECKSTYLE-332 is released. -->
    <property name="cacheFile" value="target/cache_resources"/>

    <!-- Suppressions for resources -->
    <module name="SuppressionFilter">
        <property name="file"
                  value="${project.basedir}/config/checkstyle_resources_suppressions.xml"/>
    </module>
    <!-- till https://github.com/checkstyle/checkstyle/issues/4100
    <module name="FileTabCharacter"/>
    <module name="RegexpSingleline">
        <property name="format" value="\s+$"/>
        <property name="message" value="Trailing whitespace"/>
    </module>
    -->
    <module name="RegexpOnFilename">
      <property name="folderPattern"
                value="[\\/]src[\\/](it|test)[\\/]resources(-noncompilable?)[\\/]"/>
      <property name="fileNamePattern"
                value="^(package-info.java)|(Input\w+\.java)|(.*\.properties)$"/>
      <property name="match" value="false"/>
      <message key="regexp.filepath.mismatch"
               value="All files in the ''src/(it|test)/resources'' folder
                      should be named
                      ''Input*.java'' or ''package-info.java'' or ''*.properties''."/>
    </module>

    <module name="TreeWalker">
      <module name="PackageDeclarationCheck"/>
      <module name="OuterTypeFilenameCheck"/>
    </module>

</module>
