Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement module properties macro #13399

Closed
stoyanK7 opened this issue Jul 15, 2023 · 1 comment · Fixed by #13407
Closed

Implement module properties macro #13399

stoyanK7 opened this issue Jul 15, 2023 · 1 comment · Fixed by #13407

Comments

@stoyanK7
Copy link
Collaborator

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants