Skip to content

Commit

Permalink
doc: udpate BeforeExecutionExclusionFileFilter to show example of neg…
Browse files Browse the repository at this point in the history
…ative lookahead
  • Loading branch information
romani committed Jan 30, 2021
1 parent 247e3a3 commit b0c8153
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions .ci/jsoref-spellchecker/whitelist.words
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,7 @@ localhost
localvariablename
Loggable
lombok
lookaround
Loughran
lparen
lpb
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@
* </module>
* </pre>
* <p>
* To configure the filter to run only on required files for example that ends with "Remote"
* or end with "Client" in names or named as "Remote.java" or "Client.java"
* use <a href="https://www.regular-expressions.info/lookaround.html">negative lookahead</a>:
* </p>
*
* <pre>
* &lt;module name=&quot;BeforeExecutionExclusionFileFilter&quot;&gt;
* &lt;property name=&quot;fileNamePattern&quot;
* value=&quot;^(?!.*(Remote\.java|Client\.java|[\\/]Remote\.java|[\\/]Client\.java)).*$&quot;/&gt;
* &lt;/module&gt;
* </pre>
* <p>
* Parent is {@code com.puppycrawl.tools.checkstyle.Checker}
* </p>
*
Expand Down
11 changes: 11 additions & 0 deletions src/xdocs/config_filefilters.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,17 @@
<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>
<p>
To configure the filter to run only on required files for example that ends with "Remote"
or end with "Client" in names or named as "Remote.java" or "Client.java"
use <a href="https://www.regular-expressions.info/lookaround.html">negative lookahead</a>:
</p>
<source>
&lt;module name=&quot;BeforeExecutionExclusionFileFilter&quot;&gt;
&lt;property name=&quot;fileNamePattern&quot;
value=&quot;^(?!.*(Remote\.java|Client\.java|[\\/]Remote\.java|[\\/]Client\.java)).*$&quot;/&gt;
&lt;/module&gt;
</source>
</subsection>
Expand Down

0 comments on commit b0c8153

Please sign in to comment.