Currently, we have to manually insert modules' notes subsection in the xdoc files which is very inconvenient as we have to do so every time it changes.
Examples:
Notes subsection is plainly placed in the template file as text -
|
<subsection name="Notes" id="Notes"> |
|
<p> |
|
There are two options to make validation more precise: <b>exceptionVariableName</b> and |
|
<b>commentFormat</b>. |
|
If both options are specified - they are applied by <b>any of them is matching</b>. |
|
</p> |
|
</subsection> |
We can create the notes macro that would just require us to paste the following once in the template file:
<macro name="notes">
<param name="modulePath"
value="src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/EmptyCatchBlockCheck.java"/>
</macro>
for it to automatically extract current notes part from the javadoc of module.
We will also need to add "Notes:" javadoc marking to javadoc of each needed module to make it possible to distinguish which part of javadoc is Notes
Example:
|
* |
|
* <p> |
|
* There are two options to make validation more precise: <b>exceptionVariableName</b> and |
|
* <b>commentFormat</b>. |
|
* If both options are specified - they are applied by <b>any of them is matching</b>. |
|
* </p> |
In order to make it visible that this part belongs to Notes subsection, we could just transform it to:
* <p>
* Notes:
* There are two options to make validation more precise: <b>exceptionVariableName</b> and
* <b>commentFormat</b>.
* If both options are specified - they are applied by <b>any of them is matching</b>.
* </p>
Currently, we have to manually insert modules' notes subsection in the xdoc files which is very inconvenient as we have to do so every time it changes.
Examples:
Notes subsection is plainly placed in the template file as text -
checkstyle/src/site/xdoc/checks/blocks/emptycatchblock.xml.template
Lines 18 to 24 in 02cbc39
We can create the notes macro that would just require us to paste the following once in the template file:
for it to automatically extract current notes part from the javadoc of module.
We will also need to add "Notes:" javadoc marking to javadoc of each needed module to make it possible to distinguish which part of javadoc is Notes
Example:
checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/blocks/EmptyCatchBlockCheck.java
Lines 34 to 39 in 02cbc39
In order to make it visible that this part belongs to Notes subsection, we could just transform it to: