Skip to content

Commit

Permalink
Issue #13345: enabling tests for RegexpCheckExampleTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsh-Agrawal96 authored and romani committed Jan 25, 2025
1 parent 05b2a32 commit 69c4c65
Show file tree
Hide file tree
Showing 28 changed files with 468 additions and 691 deletions.
6 changes: 5 additions & 1 deletion config/checkstyle-checks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@
<property name="lineRange" value="1"/>
<property name="idPattern" value="lineLengthXml"/>
</module>

<module name="SuppressWithNearbyTextFilter">
<property name="nearbyTextPattern" value="violation above 'Trailing whitespace'"/>
<property name="lineRange" value="-1"/>
<property name="checkPattern" value="RegexpSingleline"/>
</module>
<!-- Headers -->
<module name="Header">
<property name="headerFile" value="${checkstyle.header.file}"/>
Expand Down
6 changes: 5 additions & 1 deletion config/checkstyle-examples-checks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
<module name="SuppressionFilter">
<property name="file" value="${checkstyle.examples-suppressions.file}"/>
</module>

<module name="SuppressWithNearbyTextFilter">
<property name="nearbyTextPattern" value="violation above 'Trailing whitespace'"/>
<property name="lineRange" value="-1"/>
<property name="checkPattern" value="RegexpSingleline"/>
</module>
<!-- Regexp -->
<module name="RegexpOnFilename">
<property name="id" value="exampleFileName"/>
Expand Down
4 changes: 4 additions & 0 deletions config/checkstyle-examples-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

<suppressions>

<!-- private class used to show violation on it -->
<suppress id="exampleClassName"
files="regexp[\\/]Example4.java"/>

<!-- The files have no exampleClassName by design. -->
<suppress id="exampleClassName"
files="outertypefilename[\\/]Example3.java"/>
Expand Down
4 changes: 0 additions & 4 deletions config/jsoref-spellchecker/whitelist.words
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,6 @@ NODESET
noembed
noenumtrailingcomma
nofinalizer
NOI
noinspection
noinspectionreason
nojavadoc
Expand Down Expand Up @@ -1048,7 +1047,6 @@ Perror
pgjdbc
Pgpg
Pgpgv
pguyot
php
picocli
pid
Expand Down Expand Up @@ -1147,7 +1145,6 @@ returnsreceiver
reviewdog
revwalk
rfc
rfe
Rgb
rgba
rhs
Expand Down Expand Up @@ -1199,7 +1196,6 @@ SEO
separatorwrap
SERIALVERSIONUID
servlet
SETPOINT
severitymatchfilter
sevntu
shanegenschaw
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,19 @@
* if you want to match a &lt; symbol you need to enter &amp;lt;.
* The regular expression should be entered on one line.
* </p>
*
* <p>
* <b>Note:</b> To search for parentheses () in a regular expression
* you must escape them like \(\). This is required by the regexp engine,
* otherwise it will think they are special instruction characters.
* </p>
*
* <p>
* <b>Note:</b> To search for things that mean something in XML, like
* &lt; you need to escape them like &amp;lt;. This is required so the
* XML parser does not act on them, but instead passes the correct
* character to the regexp engine.
* </p>
* <ul>
* <li>
* Property {@code duplicateLimit} - Control whether to check for duplicates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@
the XML config file you must also take into account the XML rules. e.g.
if you want to match a &amp;lt; symbol you need to enter &amp;amp;lt;.
The regular expression should be entered on one line.
&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;Note:&lt;/b&gt; To search for parentheses () in a regular expression
you must escape them like \(\). This is required by the regexp engine,
otherwise it will think they are special instruction characters.
&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;Note:&lt;/b&gt; To search for things that mean something in XML, like
&amp;lt; you need to escape them like &amp;amp;lt;. This is required so the
XML parser does not act on them, but instead passes the correct
character to the regexp engine.
&lt;/p&gt;</description>
<properties>
<property default-value="0" name="duplicateLimit" type="int">
Expand Down
Loading

0 comments on commit 69c4c65

Please sign in to comment.