Skip to content

Commit

Permalink
Issue checkstyle#13933: Migrate multiplestringliterals.xml.template t…
Browse files Browse the repository at this point in the history
…o use properties
  • Loading branch information
piyush kumar sadangi authored and piyush kumar sadangi committed Nov 3, 2023
1 parent c7ac036 commit 9454860
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 66 deletions.
3 changes: 0 additions & 3 deletions config/checkstyle-non-main-files-suppressions.xml
Expand Up @@ -259,9 +259,6 @@
<!-- until https://github.com/checkstyle/checkstyle/issues/13930 -->
<suppress id="propertiesMacroMustExist"
files="src[\\/]xdocs[\\/]checks[\\/]coding[\\/]magicnumber.xml.template"/>
<!-- until https://github.com/checkstyle/checkstyle/issues/13933 -->
<suppress id="propertiesMacroMustExist"
files="src[\\/]xdocs[\\/]checks[\\/]coding[\\/]multiplestringliterals.xml.template"/>
<!-- Properties macro suppressions until https://github.com/checkstyle/checkstyle/issues/13693 -->
<suppress id="propertiesMacroMustExist"
files="src[\\/]xdocs[\\/]checks[\\/]design[\\/]designforextension.xml.template"/>
Expand Down
24 changes: 5 additions & 19 deletions src/xdocs/checks/coding/multiplestringliterals.xml
Expand Up @@ -32,35 +32,21 @@
</tr>
<tr>
<td>allowedDuplicates</td>
<td>
Specify the maximum number of occurrences to allow without generating a
warning.
</td>
<td>Specify the maximum number of occurrences to allow without generating a warning.</td>
<td><a href="../../property_types.html#int">int</a></td>
<td><code>1</code></td>
<td>3.5</td>
</tr>
<tr>
<td>ignoreOccurrenceContext</td>
<td>
Specify token type names where duplicate strings are ignored even if they don't
match ignoredStringsRegexp. This allows you to exclude syntactical contexts like
annotations or static initializers from the check.
</td>
<td>
subset of tokens
<a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html">TokenTypes</a>
</td>
<td>
<code>ANNOTATION</code>
</td>
<td>Specify token type names where duplicate strings are ignored even if they don't match ignoredStringsRegexp. This allows you to exclude syntactical contexts like annotations or static initializers from the check.</td>
<td>subset of tokens <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html">TokenTypes</a></td>
<td><code>ANNOTATION</code></td>
<td>4.4</td>
</tr>
<tr>
<td>ignoreStringsRegexp</td>
<td>
Specify RegExp for ignored strings (with quotation marks).
</td>
<td>Specify RegExp for ignored strings (with quotation marks).</td>
<td><a href="../../property_types.html#Pattern">Pattern</a></td>
<td><code>&quot;^&quot;&quot;$&quot;</code></td>
<td>4.0</td>
Expand Down
48 changes: 4 additions & 44 deletions src/xdocs/checks/coding/multiplestringliterals.xml.template
Expand Up @@ -22,50 +22,10 @@

<subsection name="Properties" id="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>allowedDuplicates</td>
<td>
Specify the maximum number of occurrences to allow without generating a
warning.
</td>
<td><a href="../../property_types.html#int">int</a></td>
<td><code>1</code></td>
<td>3.5</td>
</tr>
<tr>
<td>ignoreOccurrenceContext</td>
<td>
Specify token type names where duplicate strings are ignored even if they don't
match ignoredStringsRegexp. This allows you to exclude syntactical contexts like
annotations or static initializers from the check.
</td>
<td>
subset of tokens
<a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html">TokenTypes</a>
</td>
<td>
<code>ANNOTATION</code>
</td>
<td>4.4</td>
</tr>
<tr>
<td>ignoreStringsRegexp</td>
<td>
Specify RegExp for ignored strings (with quotation marks).
</td>
<td><a href="../../property_types.html#Pattern">Pattern</a></td>
<td><code>"^""$"</code></td>
<td>4.0</td>
</tr>
</table>
<macro name="properties">
<param name="modulePath"
value="src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/MultipleStringLiteralsCheck.java"/>
</macro>
</div>
</subsection>

Expand Down

0 comments on commit 9454860

Please sign in to comment.