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

<document xmlns="http://maven.apache.org/XDOC/2.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 http://maven.apache.org/xsd/xdoc-2.0.xsd">

  <head>
    <title>Before Execution File Filters</title>
    <script type="text/javascript"
            src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"/>
    <script type="text/javascript" src="js/anchors.js"/>
    <script type="text/javascript" src="js/google-analytics.js"/>
    <link rel="icon" href="images/favicon.png" type="image/x-icon" />
    <link rel="shortcut icon" href="images/favicon.ico" type="image/ico" />
  </head>

  <body>
    <section name="Content">
      <macro name="toc">
        <param name="fromDepth" value="1"/>
        <param name="toDepth" value="1"/>
      </macro>
    </section>

    <section name="BeforeExecutionExclusionFileFilter">
      <p>Since Checkstyle 7.2</p>
      <subsection name="Description" id="BeforeExecutionExclusionFileFilter_Description">
        <p>
          File filter <code>BeforeExecutionExclusionFileFilter</code> decides which files should be
          excluded from being processed by the utility.
        </p>
        <p>
          By default Checkstyle includes all files and sub-directories in a directory to be
          processed and checked for violations. Users could have files that are in these
          sub-directories that shouldn't be processed with their checkstyle configuration for
          various reasons, one of which is a valid Java file that won't pass Checkstyle's parser.
          When Checkstyle tries to parse a Java file and fails, it will throw an
          <code>Exception</code> and halt parsing any more files for violations. An example of a
          valid Java file Checkstyle can't parse is JDK 9's <code>module-info.java</code>.
          This file filter will exclude these problem files from being parsed,
          allowing the rest of the files to run normal and be validated.
        </p>
        <p>
          <b>Note:</b> When a file is excluded from the utility, it is excluded from all Checks and
          no testing for violations will be performed on them.
        </p>
      </subsection>
      <subsection name="Properties" id="BeforeExecutionExclusionFileFilter_Properties">
        <div class="wrapper">
          <table>
            <tr>
              <th>name</th>
              <th>description</th>
              <th>type</th>
              <th>default value</th>
              <th>since</th>
            </tr>
            <tr>
              <td>fileNamePattern</td>
              <td>Define regular expression to match the file name against.</td>
              <td><a href="property_types.html#regexp">Regular Expression</a></td>
              <td><code>null</code></td>
              <td>7.2</td>
            </tr>
          </table>
        </div>
      </subsection>
      <subsection name="Examples" id="BeforeExecutionExclusionFileFilter_Examples">
          <p>
            To configure the filter to exclude all 'module-info.java' files:
          </p>
          <source>
&lt;module name=&quot;BeforeExecutionExclusionFileFilter&quot;&gt;
  &lt;property name=&quot;fileNamePattern&quot; value=&quot;module\-info\.java$&quot;/&gt;
&lt;/module&gt;
          </source>
      </subsection>
      <subsection name="Example of Usage" id="BeforeExecutionExclusionFileFilter_Example_of_Usage">
        <ul>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Agoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+BeforeExecutionExclusionFileFilter">
              Google Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Asrc%2Fmain%2Fresources+filename%3Asun_checks.xml+repo%3Acheckstyle%2Fcheckstyle+BeforeExecutionExclusionFileFilter">
              Sun Style</a>
          </li>
          <li>
            <a href="https://github.com/search?q=path%3Aconfig+filename%3Acheckstyle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+BeforeExecutionExclusionFileFilter">
            Checkstyle Style</a>
          </li>
        </ul>
      </subsection>
      <subsection name="Package" id="BeforeExecutionExclusionFileFilter_Package">
        <p> com.puppycrawl.tools.checkstyle.filefilters </p>
      </subsection>

      <subsection name="Parent Module" id="BeforeExecutionExclusionFileFilter_Parent_Module">
        <p> <a href="config.html#Checker">Checker</a> </p>
      </subsection>
    </section>
  </body>
</document>
