Skip to content

Xdoc marco to put version in xdoc from 'since' javadoc tag on Check #18218

@romani

Description

@romani

detected at #17329 (comment)

We did not make macro for since of Check

that results in copy-paste of version at

this is annoying mostly during PR to create new Check, as this always requies updates, and not easy to spot that template is not updated.

TODO:
we need just another macro for xdoc, to take this value from file.

in stead of

<section xmlns="http://maven.apache.org/XDOC/2.0"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="AnnotationLocation">
      <p>Since Checkstyle 6.0</p>
      <subsection name="Description" id="AnnotationLocation_Description">

we can have:

<section xmlns="http://maven.apache.org/XDOC/2.0"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="AnnotationLocation">
        <macro name="since">
            <param name="modulePath"
                   value="src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationLocationCheck.java"/>
        </macro>
      <subsection name="Description" id="AnnotationLocation_Description">

Example of macro creation is at #18217 , but there are macros in project as examples.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions