Skip to content

Issue #17882: Update EQUALS of JavadocCommentsTokenTypes to new AST f…#18807

Merged
romani merged 1 commit into
checkstyle:masterfrom
M-Talha-Atif:doc-equals-token
Jan 31, 2026
Merged

Issue #17882: Update EQUALS of JavadocCommentsTokenTypes to new AST f…#18807
romani merged 1 commit into
checkstyle:masterfrom
M-Talha-Atif:doc-equals-token

Conversation

@M-Talha-Atif

@M-Talha-Atif M-Talha-Atif commented Jan 31, 2026

Copy link
Copy Markdown

Description

Updates the Javadoc documentation for the EQUALS token to include the new AST print format generated by the latest Checkstyle snapshot.

Related Issue

Fixes #17882

Example Input

public class Test {

    /**
     * {@snippet lang="java" :
     *   int x = 1;
     * }
     */
    void m() {}
}

Command:

java -jar checkstyle-13.1.0-SNAPSHOT-all.jar -j src/Test.java | sed "s/\[[0-9]\+:[0-9]\+\]//g 

Here is the full CLI output:

JAVADOC_CONTENT -> JAVADOC_CONTENT
|--TEXT -> public class Test {
|--NEWLINE -> \r\n
|--NEWLINE -> \r\n
|--TEXT ->     /**
|--NEWLINE -> \r\n
|--LEADING_ASTERISK ->      *
|--TEXT ->
|--JAVADOC_INLINE_TAG -> JAVADOC_INLINE_TAG
|   `--SNIPPET_INLINE_TAG -> SNIPPET_INLINE_TAG
|       |--JAVADOC_INLINE_TAG_START -> {@
|       |--SNIPPET_ATTRIBUTES -> SNIPPET_ATTRIBUTES
|       |   `--SNIPPET_ATTRIBUTE -> SNIPPET_ATTRIBUTE
|       |       |--TEXT ->
|       |       |--SNIPPET_ATTR_NAME -> lang
|       |       |--EQUALS -> =
|       |       `--ATTRIBUTE_VALUE -> "java"
|       |--COLON -> :
|       |--SNIPPET_BODY -> SNIPPET_BODY
|       |   |--NEWLINE -> \r\n
|       |   |--LEADING_ASTERISK ->      *
|       |   |--TEXT ->    int x = 1;
|       |   |--NEWLINE -> \r\n
|       |   |--LEADING_ASTERISK ->      *
|       |   `--TEXT ->
|       `--JAVADOC_INLINE_TAG_END -> }
|--NEWLINE -> \r\n
|--LEADING_ASTERISK ->      *
|--TEXT -> /
|--NEWLINE -> \r\n
|--TEXT ->     void m() {}
|--NEWLINE -> \r\n
|--TEXT -> }
`--NEWLINE -> \r\n

Testing

  • ./mvnw clean verify passes

@M-Talha-Atif

Copy link
Copy Markdown
Author

@romani Hello, could you please review this pull request when convenient

@romani romani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot

@romani romani merged commit 14d1ca8 into checkstyle:master Jan 31, 2026
70 checks passed
@M-Talha-Atif M-Talha-Atif deleted the doc-equals-token branch March 7, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update JavadocCommentsTokenTypes.java to new format of AST print

2 participants