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

Issue #14631: Updated Version literal to new AST format #14823

Merged
merged 1 commit into from May 4, 2024

Conversation

prathm3
Copy link
Contributor

@prathm3 prathm3 commented Apr 22, 2024

Issue: #14631

/**
 * This class represents a Test object.
 *
 * @version 1.3
 */
public class Test {
}


$ java -jar checkstyle-10.15.0-all.jar -J Test.java | sed "s/\[[0-9]\+:[0-9]\+\]//g"
COMPILATION_UNIT -> COMPILATION_UNIT
`--CLASS_DEF -> CLASS_DEF
    |--MODIFIERS -> MODIFIERS
    |   |--BLOCK_COMMENT_BEGIN -> /*
    |   |   |--COMMENT_CONTENT -> *\r\n * This class represents a Test object.\r\n *\r\n * @version 1.3\r\n
    |   |   |   `--JAVADOC -> JAVADOC
    |   |   |       |--NEWLINE -> \r\n
    |   |   |       |--LEADING_ASTERISK ->  *
    |   |   |       |--TEXT ->  This class represents a Test object.
    |   |   |       |--NEWLINE -> \r\n
    |   |   |       |--LEADING_ASTERISK ->  *
    |   |   |       |--NEWLINE -> \r\n
    |   |   |       |--LEADING_ASTERISK ->  *
    |   |   |       |--WS ->
    |   |   |       |--JAVADOC_TAG -> JAVADOC_TAG
    |   |   |       |   |--VERSION_LITERAL -> @version
    |   |   |       |   |--WS ->
    |   |   |       |   `--DESCRIPTION -> DESCRIPTION
    |   |   |       |       |--TEXT -> 1.3
    |   |   |       |       |--NEWLINE -> \r\n
    |   |   |       |       `--TEXT ->
    |   |   |       `--EOF -> <EOF>
    |   |   `--BLOCK_COMMENT_END -> */
    |   `--LITERAL_PUBLIC -> public
    |--LITERAL_CLASS -> class
    |--IDENT -> Test
    `--OBJBLOCK -> OBJBLOCK
        |--LCURLY -> {
        `--RCURLY -> }

Copy link
Contributor

@MANISH-K-07 MANISH-K-07 left a comment

Choose a reason for hiding this comment

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

Items:

* |--VERSION_LITERAL -> @version
* |--WS ->
* `--DESCRIPTION -> DESCRIPTION
* |--TEXT -> 1.3
Copy link
Contributor

Choose a reason for hiding this comment

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

@prathm3 , please trim AST upto line 271. This is the only part that we have to document.

We don't need the below lines 272, 273 and also please remove blank line at 274.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@romani
Copy link
Member

romani commented Apr 23, 2024

Single commit please

@prathm3 prathm3 closed this Apr 23, 2024
@prathm3 prathm3 reopened this Apr 23, 2024
@prathm3 prathm3 force-pushed the JavadocTokenVersionLiteral branch from e837b97 to 7fc93b1 Compare May 4, 2024 06:10
@prathm3
Copy link
Contributor Author

prathm3 commented May 4, 2024

Single commit please

Done. Please review.

Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

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

Ok to merge.
Thanks a lot!

@romani romani merged commit 9fa1eed into checkstyle:master May 4, 2024
114 checks passed
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.

None yet

3 participants