-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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: update SINCE_LITERAL in JavadocTokenTypes.java to new format of AST print #14631 #14738
Merged
+5
−5
Merged
Issue #14631: update SINCE_LITERAL in JavadocTokenTypes.java to new format of AST print #14631 #14738
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line should start with " `".
I understand that we skip
\r\n
lines that are windows specific, but not sure why we missedTEXT -->
please share input file file with content of javadoc,
I will rerun your cmd on my side to check AST.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@romani , I thought the `TEXT --> is only when the tag is last of javadoc content (i.e. part of tag before EOF) as evident from #14632 (comment).
Since we trim the AST to only one specific tag and it's description, isn't this line redundant here for our docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use
-j, --javadocTree
https://checkstyle.org/cmdline.html ?So we will provide exactly a content that is in example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@romani , still would be the same thing I believe.
The Text -> part that you were referring to is at EOF only (here by EOF, I mean end of javadoc parse file)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From doc:
Please try without java comments '/**'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes @romani , that was what I did by default for Ast using -j.
I have added the comment headers /** later on only to show the difference where Text -> is displayed..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To answer your question at #14738 (comment), from what I understand, the parser only knows what a leading asterix is. It doesn't know what '/**' and '/' are so, it simply flushes them as text.
The start of javadoc chunk and after the last tag (i.e. just before end of javadoc file)
|--TEXT -> /**
and|--TEXT -> /
We are only providing examples of AST for one specific tag, so I trimmed this part in the first PR itself to begin with :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just need to remove newline character from javadoc snippet file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use Git Bash as my working terminal which supports essential linux commands and combines with windows overall setting