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 See literal to new AST format #14818

Merged
merged 1 commit into from May 11, 2024

Conversation

prathm3
Copy link
Contributor

@prathm3 prathm3 commented Apr 21, 2024

Issue: #14631

$ cat Test.java
public class Test {
    /**
     * Javadoc.
     *
     *@see org.apache.utils.Lists.Comparator#compare(Object)
     */
    public void testFunction() {}
}
prath@LAPTOP-5K4C7SC4 /cygdrive/c/Users/prath/Downloads
$ 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
    |   `--LITERAL_PUBLIC -> public
    |--LITERAL_CLASS -> class
    |--IDENT -> Test
    `--OBJBLOCK -> OBJBLOCK
        |--LCURLY -> {
        |--METHOD_DEF -> METHOD_DEF
        |   |--MODIFIERS -> MODIFIERS
        |   |   |--BLOCK_COMMENT_BEGIN -> /*
        |   |   |   |--COMMENT_CONTENT -> *\r\n     * Javadoc.\r\n     *\r\n     *@see org.apache.utils.Lists.Comparator#compare(Object)\r\n
        |   |   |   |   `--JAVADOC -> JAVADOC
        |   |   |   |       |--NEWLINE -> \r\n
        |   |   |   |       |--LEADING_ASTERISK ->      *
        |   |   |   |       |--TEXT ->  Javadoc.
        |   |   |   |       |--NEWLINE -> \r\n
        |   |   |   |       |--LEADING_ASTERISK ->      *
        |   |   |   |       |--NEWLINE -> \r\n
        |   |   |   |       |--LEADING_ASTERISK ->      *
        |   |   |   |       |--JAVADOC_TAG -> JAVADOC_TAG
        |   |   |   |       |   |--SEE_LITERAL -> @see
        |   |   |   |       |   |--WS ->
        |   |   |   |       |   |--REFERENCE -> REFERENCE
        |   |   |   |       |   |   |--PACKAGE_CLASS -> org.apache.utils.Lists.Comparator
        |   |   |   |       |   |   |--HASH -> #
        |   |   |   |       |   |   |--MEMBER -> compare
        |   |   |   |       |   |   `--PARAMETERS -> PARAMETERS
        |   |   |   |       |   |       |--LEFT_BRACE -> (
        |   |   |   |       |   |       |--ARGUMENT -> Object
        |   |   |   |       |   |       `--RIGHT_BRACE -> )
        |   |   |   |       |   |--NEWLINE -> \r\n
        |   |   |   |       |   `--WS ->
        |   |   |   |       `--EOF -> <EOF>
        |   |   |   `--BLOCK_COMMENT_END -> */
        |   |   `--LITERAL_PUBLIC -> public
        |   |--TYPE -> TYPE
        |   |   `--LITERAL_VOID -> void
        |   |--IDENT -> testFunction
        |   |--LPAREN -> (
        |   |--PARAMETERS -> PARAMETERS
        |   |--RPAREN -> )
        |   `--SLIST -> {
        |       `--RCURLY -> }
        `--RCURLY -> }

prath@LAPTOP-5K4C7SC4 /cygdrive/c/Users/prath/Downloads

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.

Item:

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.

Please squash and rebase to single commit to make CI green

@prathm3 prathm3 force-pushed the JavadocTokenChangesForSeeLitral branch from 14eb3c8 to f50c915 Compare April 21, 2024 12:56
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 if CI pass

@MANISH-K-07
Copy link
Contributor

ok to merge if CI pass

@romani , Just pointing out, there are still 2 commits in this PR..

@romani
Copy link
Member

romani commented Apr 21, 2024

thanks a lot for hint.

@prathm3 , please squash commits in one commit.

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.

see above

@prathm3 prathm3 force-pushed the JavadocTokenChangesForSeeLitral branch 2 times, most recently from f50c915 to e4bac3d Compare April 21, 2024 14:14
* |--LEFT_BRACE[3x46] : [(]
* |--ARGUMENT[3x47] : [Object]
* |--RIGHT_BRACE[3x53] : [)]
* |--JAVADOC_TAG -> JAVADOC_TAG
Copy link
Contributor

Choose a reason for hiding this comment

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

@prathm3 , looks like you dropped the latest commit instead of squash.
The suggested changes are reverted now. Please see to it....

https://checkstyle.org/beginning_development.html contains good documentation on rebase steps

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MANISH-K-07 Thank you for your help. This is my first squashed commit. I have squashed changes. Please let me know any changes required.

@prathm3 prathm3 force-pushed the JavadocTokenChangesForSeeLitral branch 2 times, most recently from 34bdd69 to 49ea489 Compare April 21, 2024 14:43
@prathm3
Copy link
Contributor Author

prathm3 commented Apr 21, 2024

@prathm3 , please squash commits in one commit.

@romani, I have made changes, let me know any changes needed.

* JAVADOC_TAG -> JAVADOC_TAG
* |--SEE_LITERAL -> @see
* |--WS ->
* |--REFERENCE -> REFERENCE
Copy link
Contributor

Choose a reason for hiding this comment

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

The 3 lines above are spaced one extra I think.
@prathm3 , could you please recheck with AST from cli?

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

@prathm3 prathm3 force-pushed the JavadocTokenChangesForSeeLitral branch from e9df57c to f4bcaad Compare April 21, 2024 17:28
@romani romani merged commit 3c5b315 into checkstyle:master May 11, 2024
113 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