KEMBAR78
Update SummaryJavadocCheck by mahfouz72 · Pull Request #78 · checkstyle-GSoC25/checkstyle · GitHub
Skip to content

Conversation

@mahfouz72
Copy link
Collaborator

@mahfouz72 mahfouz72 commented Aug 29, 2025

@mahfouz72 mahfouz72 marked this pull request as draft August 29, 2025 18:08
@mahfouz72 mahfouz72 marked this pull request as ready for review August 30, 2025 12:50
@mahfouz72
Copy link
Collaborator Author

Github, generate report for SummaryJavadoc/all-examples-in-one

@mahfouz72 mahfouz72 requested a review from rnveach August 30, 2025 12:52
@mahfouz72 mahfouz72 assigned mahfouz72 and unassigned nrmancuso Aug 30, 2025
@mahfouz72 mahfouz72 removed the request for review from rnveach August 30, 2025 13:14
@github-actions
Copy link

github-actions bot commented Aug 30, 2025

Report generation failed. Please check the logs for more details.

Link: https://github.com/checkstyle/checkstyle/actions/runs/17343992904

Caused by: java.lang.OutOfMemoryError: Java heap space
at java.base/java.util.Arrays.copyOfRangeByte(Arrays.java:3863)
at java.base/java.util.Arrays.copyOfRange(Arrays.java:3854)
at java.base/java.lang.String.(String.java:4788)

@mahfouz72 mahfouz72 force-pushed the summary-javadoc branch 2 times, most recently from 9fa1969 to e7167c7 Compare August 30, 2025 13:37
@mahfouz72
Copy link
Collaborator Author

Github, generate report for SummaryJavadoc/Example1

@mahfouz72 mahfouz72 assigned nrmancuso and unassigned mahfouz72 Aug 30, 2025
@mahfouz72 mahfouz72 requested a review from rnveach August 30, 2025 14:00
@github-actions
Copy link

Report generation failed. Please check the logs for more details.

Link: https://github.com/checkstyle/checkstyle/actions/runs/17344467178

@nrmancuso
Copy link

@mahfouz72
Copy link
Collaborator Author

Github, generate report for configs in PR description

@github-actions
Copy link

Report generation failed. Please check the logs for more details.

Link: https://github.com/checkstyle/checkstyle/actions/runs/17350075694

@mahfouz72
Copy link
Collaborator Author

The report is falling with OOM even with single project in projects file
@nrmancuso @rnveach what else can I do here. Is this expected

@rnveach
Copy link

rnveach commented Aug 31, 2025

Is this expected

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) {
Copy link

@rnveach rnveach Aug 31, 2025

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.

Copy link
Collaborator Author

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

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.

Copy link

@rnveach rnveach Sep 1, 2025

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.

@mahfouz72
Copy link
Collaborator Author

Only if master acts the same. If it doesn't its your changes

checkstyle#16659 (comment)

Report in the main repo is generated in 5 min 😮

@mahfouz72
Copy link
Collaborator Author

Github, generate report for configs in PR description

@github-actions
Copy link

Report generation failed. Please check the logs for more details.

Link: https://github.com/checkstyle/checkstyle/actions/runs/17363615352

@mahfouz72
Copy link
Collaborator Author

image 🫨

@mahfouz72
Copy link
Collaborator Author

Github, generate report for configs in PR description

@github-actions
Copy link

github-actions bot commented Sep 1, 2025

@mahfouz72
Copy link
Collaborator Author

@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

@mahfouz72 mahfouz72 merged commit b965c12 into new-javadoc-grammar Sep 3, 2025
20 checks passed
mahfouz72 added a commit that referenced this pull request Sep 9, 2025
mahfouz72 added a commit that referenced this pull request Sep 13, 2025
mahfouz72 added a commit that referenced this pull request Sep 16, 2025
mahfouz72 added a commit that referenced this pull request Sep 27, 2025
mahfouz72 added a commit that referenced this pull request Sep 29, 2025
mahfouz72 added a commit that referenced this pull request Oct 3, 2025
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.

3 participants