Skip to content

Commit

Permalink
Issue checkstyle#13693: migrate last javadoc modules to macroses
Browse files Browse the repository at this point in the history
  • Loading branch information
romani committed Jan 1, 2024
1 parent 8531fec commit 595ff74
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 196 deletions.
4 changes: 0 additions & 4 deletions config/checkstyle-non-main-files-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,6 @@
<!-- Properties macro suppressions until https://github.com/checkstyle/checkstyle/issues/13693 -->
<suppress id="propertiesMacroMustExist"
files="src[\\/]xdocs[\\/]checks[\\/]imports[\\/]customimportorder.xml.template"/>
<suppress id="propertiesMacroMustExist"
files="src[\\/]xdocs[\\/]checks[\\/]javadoc[\\/]javadocparagraph.xml.template"/>
<suppress id="propertiesMacroMustExist"
files="src[\\/]xdocs[\\/]checks[\\/]javadoc[\\/]javadocstyle.xml.template"/>
<suppress id="propertiesMacroMustExist"
files="src[\\/]xdocs[\\/]checks[\\/]misc[\\/]orderedproperties.xml.template"/>
<suppress id="propertiesMacroMustExist"
Expand Down
12 changes: 3 additions & 9 deletions src/xdocs/checks/javadoc/javadocparagraph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,15 @@
</tr>
<tr>
<td>allowNewlineParagraph</td>
<td>
Control whether the &lt;p&gt; tag should be placed immediately before the first
word.
</td>
<td>Control whether the &lt;p&gt; tag should be placed immediately before the first word.</td>
<td><a href="../../property_types.html#boolean">boolean</a></td>
<td><code>true</code></td>
<td>6.9</td>
</tr>
<tr>
<td>violateExecutionOnNonTightHtml</td>
<td>
Control when to print violations if the Javadoc being examined by this check
violates the tight html rules defined at
<a href="../../writingjavadocchecks.html#Tight-HTML_rules">Tight-HTML Rules</a>.
</td>
<td>Control when to print violations if the Javadoc being examined by this check violates the tight html rules defined at <a href="../../writingjavadocchecks.html#Tight-HTML_rules">
Tight-HTML Rules</a>.</td>
<td><a href="../../property_types.html#boolean">boolean</a></td>
<td><code>false</code></td>
<td>8.3</td>
Expand Down
34 changes: 4 additions & 30 deletions src/xdocs/checks/javadoc/javadocparagraph.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,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>allowNewlineParagraph</td>
<td>
Control whether the &lt;p&gt; tag should be placed immediately before the first
word.
</td>
<td><a href="../../property_types.html#boolean">boolean</a></td>
<td><code>true</code></td>
<td>6.9</td>
</tr>
<tr>
<td>violateExecutionOnNonTightHtml</td>
<td>
Control when to print violations if the Javadoc being examined by this check
violates the tight html rules defined at
<a href="../../writingjavadocchecks.html#Tight-HTML_rules">Tight-HTML Rules</a>.
</td>
<td><a href="../../property_types.html#boolean">boolean</a></td>
<td><code>false</code></td>
<td>8.3</td>
</tr>
</table>
<macro name="properties">
<param name="modulePath"
value="src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocParagraphCheck.java"/>
</macro>
</div>
</subsection>

Expand Down
68 changes: 31 additions & 37 deletions src/xdocs/checks/javadoc/javadocstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,14 @@
</tr>
<tr>
<td>checkEmptyJavadoc</td>
<td>
Control whether to check if the Javadoc is missing a describing text.
</td>
<td>Control whether to check if the Javadoc is missing a describing text.</td>
<td><a href="../../property_types.html#boolean">boolean</a></td>
<td><code>false</code></td>
<td>3.4</td>
</tr>
<tr>
<td>checkFirstSentence</td>
<td>
Control whether to check the first sentence for proper end of sentence.
</td>
<td>Control whether to check the first sentence for proper end of sentence.</td>
<td><a href="../../property_types.html#boolean">boolean</a></td>
<td><code>true</code></td>
<td>3.2</td>
Expand All @@ -99,9 +95,7 @@
</tr>
<tr>
<td>endOfSentenceFormat</td>
<td>
Specify the format for matching the end of a sentence.
</td>
<td>Specify the format for matching the end of a sentence.</td>
<td><a href="../../property_types.html#Pattern">Pattern</a></td>
<td><code>&quot;([.?!][ \t\n\r\f&lt;])|([.?!]$)&quot;</code></td>
<td>5.0</td>
Expand All @@ -125,56 +119,56 @@
<td>tokens to check</td>
<td>subset of tokens
<a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_DEF">
ANNOTATION_DEF</a>
ANNOTATION_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_FIELD_DEF">
ANNOTATION_FIELD_DEF</a>
ANNOTATION_FIELD_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">
CLASS_DEF</a>
CLASS_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">
CTOR_DEF</a>
CTOR_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_CONSTANT_DEF">
ENUM_CONSTANT_DEF</a>
ENUM_CONSTANT_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_DEF">
ENUM_DEF</a>
ENUM_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">
INTERFACE_DEF</a>
INTERFACE_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">
METHOD_DEF</a>
METHOD_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PACKAGE_DEF">
PACKAGE_DEF</a>
PACKAGE_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">
VARIABLE_DEF</a>
,<a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RECORD_DEF">
RECORD_DEF</a>
,<a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COMPACT_CTOR_DEF">
COMPACT_CTOR_DEF</a>
VARIABLE_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RECORD_DEF">
RECORD_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COMPACT_CTOR_DEF">
COMPACT_CTOR_DEF</a>
.
</td>
<td>
<a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_DEF">
ANNOTATION_DEF</a>
ANNOTATION_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_FIELD_DEF">
ANNOTATION_FIELD_DEF</a>
ANNOTATION_FIELD_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">
CLASS_DEF</a>
CLASS_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">
CTOR_DEF</a>
CTOR_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_CONSTANT_DEF">
ENUM_CONSTANT_DEF</a>
ENUM_CONSTANT_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_DEF">
ENUM_DEF</a>
ENUM_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">
INTERFACE_DEF</a>
INTERFACE_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">
METHOD_DEF</a>
METHOD_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PACKAGE_DEF">
PACKAGE_DEF</a>
PACKAGE_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">
VARIABLE_DEF</a>
,<a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RECORD_DEF">
RECORD_DEF</a>
,<a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COMPACT_CTOR_DEF">
COMPACT_CTOR_DEF</a>
VARIABLE_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RECORD_DEF">
RECORD_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COMPACT_CTOR_DEF">
COMPACT_CTOR_DEF</a>
.
</td>
<td>3.2</td>
Expand Down
120 changes: 4 additions & 116 deletions src/xdocs/checks/javadoc/javadocstyle.xml.template
Original file line number Diff line number Diff line change
Expand Up @@ -64,122 +64,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>checkEmptyJavadoc</td>
<td>
Control whether to check if the Javadoc is missing a describing text.
</td>
<td><a href="../../property_types.html#boolean">boolean</a></td>
<td><code>false</code></td>
<td>3.4</td>
</tr>
<tr>
<td>checkFirstSentence</td>
<td>
Control whether to check the first sentence for proper end of sentence.
</td>
<td><a href="../../property_types.html#boolean">boolean</a></td>
<td><code>true</code></td>
<td>3.2</td>
</tr>
<tr>
<td>checkHtml</td>
<td>Control whether to check for incomplete HTML tags.</td>
<td><a href="../../property_types.html#boolean">boolean</a></td>
<td><code>true</code></td>
<td>3.2</td>
</tr>
<tr>
<td>endOfSentenceFormat</td>
<td>
Specify the format for matching the end of a sentence.
</td>
<td><a href="../../property_types.html#Pattern">Pattern</a></td>
<td><code>"([.?!][ \t\n\r\f&lt;])|([.?!]$)"</code></td>
<td>5.0</td>
</tr>
<tr>
<td>excludeScope</td>
<td>Specify the visibility scope where Javadoc comments are not checked.</td>
<td><a href="../../property_types.html#Scope">Scope</a></td>
<td><code>null</code></td>
<td>3.4</td>
</tr>
<tr>
<td>scope</td>
<td>Specify the visibility scope where Javadoc comments are checked.</td>
<td><a href="../../property_types.html#Scope">Scope</a></td>
<td><code>private</code></td>
<td>3.2</td>
</tr>
<tr>
<td>tokens</td>
<td>tokens to check</td>
<td>subset of tokens
<a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_DEF">
ANNOTATION_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_FIELD_DEF">
ANNOTATION_FIELD_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">
CLASS_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">
CTOR_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_CONSTANT_DEF">
ENUM_CONSTANT_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_DEF">
ENUM_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">
INTERFACE_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">
METHOD_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PACKAGE_DEF">
PACKAGE_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">
VARIABLE_DEF</a>
,<a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RECORD_DEF">
RECORD_DEF</a>
,<a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COMPACT_CTOR_DEF">
COMPACT_CTOR_DEF</a>
.
</td>
<td>
<a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_DEF">
ANNOTATION_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATION_FIELD_DEF">
ANNOTATION_FIELD_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">
CLASS_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">
CTOR_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_CONSTANT_DEF">
ENUM_CONSTANT_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ENUM_DEF">
ENUM_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">
INTERFACE_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">
METHOD_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#PACKAGE_DEF">
PACKAGE_DEF</a>
, <a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">
VARIABLE_DEF</a>
,<a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#RECORD_DEF">
RECORD_DEF</a>
,<a href="../../apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#COMPACT_CTOR_DEF">
COMPACT_CTOR_DEF</a>
.
</td>
<td>3.2</td>
</tr>
</table>
<macro name="properties">
<param name="modulePath"
value="src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocStyleCheck.java"/>
</macro>
</div>
</subsection>

Expand Down

0 comments on commit 595ff74

Please sign in to comment.