Skip to content

Implement module properties macro #13399

@stoyanK7

Description

@stoyanK7

After #13357 is merged, we will have xdoc templates that use macros for examples. We can create a macro for the properties table that can look like:

    <macro name="properties">
      <param name="modulePath"
             value="src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbstractClassNameCheck.java"/>
    </macro>

When the generation of xdocs is run, the macro should produce the following result by crawling the java module

<div class="wrapper">
<table>
<tr>
<th>name</th>
<th>description</th>
<th>type</th>
<th>default value</th>
<th>since</th>
</tr>
<tr>
<td>format</td>
<td>Specify valid identifiers.</td>
<td><a href="../../property_types.html#Pattern">Pattern</a></td>
<td><code>"^Abstract.+$"</code></td>
<td>3.2</td>
</tr>
<tr>
<td>ignoreModifier</td>
<td>
Control whether to ignore checking for the
<code>abstract</code> modifier on classes that match the
name.
</td>
<td><a href="../../property_types.html#boolean">boolean</a></td>
<td><code>false</code></td>
<td>5.3</td>
</tr>
<tr>
<td>ignoreName</td>
<td>
Control whether to ignore checking the name. Realistically
only useful if using the check to identify that match name
and do not have the <code>abstract</code> modifier.
</td>
<td><a href="../../property_types.html#boolean">boolean</a></td>
<td><code>false</code></td>
<td>5.3</td>
</tr>
</table>
</div>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions