-
Notifications
You must be signed in to change notification settings - Fork 0
Update SummaryJavadocCheck #78
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
Conversation
2039d95 to
a4058a0
Compare
|
Github, generate report for SummaryJavadoc/all-examples-in-one |
|
Report generation failed. Please check the logs for more details.
|
9fa1969 to
e7167c7
Compare
|
Github, generate report for SummaryJavadoc/Example1 |
|
Report generation failed. Please check the logs for more details. |
|
Report is failing with OOM https://github.com/checkstyle-GSoC25/checkstyle/actions/runs/17344467178/job/49242630246#step:13:4804 |
|
Github, generate report for configs in PR description |
|
Report generation failed. Please check the logs for more details. |
|
The report is falling with OOM even with single project in projects file |
Only if master acts the same. If it doesn't its your changes. |
| extractInlineTagContent(currentNode, customTagContent); | ||
| currentNode = JavadocUtil.getNextSibling(currentNode); | ||
| DetailNode curNode = descriptionNode; | ||
| while (curNode != null) { |
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 looks like a duplicate of TreeWalker which says to go to the complete end of the tree every time it is called. There is no early out.
IMO, there should be only 1 TreeWalker (unless we are going into a different AST). Any duplicate is possibly bad code as TreeWalker will also walk through the same tree again after the check is done.
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 looks like a duplicate of TreeWalker which says to go to the complete end of the tree every time it is called. There is no early out.
Complete end of the whole tree? No, it stops when it hits the descriptionNode again, so this is an early out
checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/SummaryJavadocCheck.java
Line 385 in e7167c7
| while (curNode != descriptionNode && toVisit == null) { |
IMO, there should be only 1 TreeWalker (unless we are going into a different AST).
It is not a different AST, but a specific subtree that needs to be traversed based on certain conditions. We also need to maintain awareness of the context we came from. I am not sure how we could achieve the same implementation using a visitor pattern, or which tokens we should stop at.
This is a mini tree walker, and I think we have a lot of them in our checks.
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.
There is no break and the while loop I mentioned says to go until it is null, which is usually the end of the tree.
Report in the main repo is generated in 5 min 😮 |
|
Github, generate report for configs in PR description |
|
Report generation failed. Please check the logs for more details. |
e7167c7 to
a59e521
Compare
|
Github, generate report for configs in PR description |
|
SummaryJavadoc/all-examples-in-one: |
|
@rnveach I solved the OOM issue and report lgtm please review. You will find many diffs but most of them is multiplied by 3 because we have 3 configs and a lot of them are repeated examples in different files |

Report label: SummaryJavadoc/all-examples-in-one
Diff Regression config: https://raw.githubusercontent.com/checkstyle/test-configs/main/SummaryJavadoc/all-examples-in-one/config.xml
Diff Regression projects: https://gist.githubusercontent.com/mahfouz72/e175be6712b9073ad7340fdaa752fc4e/raw/c2e68c6abd2f57777fdeeb4613343e5ba46d61b4/projects-to-test-on.properties