Skip to content

Issue #18571: New Check BlockCommentEndPositionCheck#19039

Open
Praveen7294 wants to merge 1 commit into
checkstyle:masterfrom
Praveen7294:javadoc
Open

Issue #18571: New Check BlockCommentEndPositionCheck#19039
Praveen7294 wants to merge 1 commit into
checkstyle:masterfrom
Praveen7294:javadoc

Conversation

@Praveen7294

@Praveen7294 Praveen7294 commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Issue #18571

Implemented a new check, BlockCommentEndPositionCheck, that verifies that */ is either alone on its own line or on the same line as /**.

Contirbution repo PR: checkstyle/contribution#1034

New module config: https://gist.githubusercontent.com/Praveen7294/c6fd73abb4cfc532c5f9f14822d3ca58/raw/da5c048293c4009580a506bb41ca00e8dea77aab/config.xml

@Praveen7294

Copy link
Copy Markdown
Contributor Author

created a PR to fix ci/semaphore failure. sevntu-checkstyle/sevntu.checkstyle#1157

@Praveen7294

Copy link
Copy Markdown
Contributor Author

GitHub, generate website

@Praveen7294

Copy link
Copy Markdown
Contributor Author

GitHub, generate report

@github-actions

Copy link
Copy Markdown
Contributor

Report generation failed on phase "make_report",
step "Generate report".
Link: https://github.com/checkstyle/checkstyle/actions/runs/22494727472

@Praveen7294

Copy link
Copy Markdown
Contributor Author

GitHub, generate report

@github-actions

Copy link
Copy Markdown
Contributor

Report generation failed on phase "make_report",
step "Generate report".
Link: https://github.com/checkstyle/checkstyle/actions/runs/22497014031

@Praveen7294

Copy link
Copy Markdown
Contributor Author
Error:  Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.12.1:site (default-site) on project sample: Error generating maven-checkstyle-plugin:3.1.1:checkstyle report: Failed during checkstyle configuration: Exception was thrown while processing /home/runner/work/checkstyle/checkstyle/.ci-temp/contribution/checkstyle-tester/src/main/java/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/filefilters/beforeexecutionexclusionfilefilter/module-info.java: IllegalStateException occurred while parsing file /home/runner/work/checkstyle/checkstyle/.ci-temp/contribution/checkstyle-tester/src/main/java/checkstyle/src/xdocs-examples/resources-noncompilable/com/puppycrawl/tools/checkstyle/filefilters/beforeexecutionexclusionfilefilter/module-info.java. 1:0: no viable alternative at input 'module': NoViableAltException -> [Help 1]

@romani I am getting the above error while generating the diff report. Can you help me fix this?

@vivek-0509

vivek-0509 commented Feb 27, 2026

Copy link
Copy Markdown
Member

@Praveen7294

Copy link
Copy Markdown
Contributor Author

@vivek-0509 Thanks

@Praveen7294

Copy link
Copy Markdown
Contributor Author

GitHub, generate report

@github-actions

Copy link
Copy Markdown
Contributor

@Praveen7294

Copy link
Copy Markdown
Contributor Author

i reviewed diff report and found ambiguous case.

https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/69d11d2_2026190807/reports/diff/openjdk25/index.html#A4

/*****************************************************************
 * CPUSet Subsystem.
 *****************************************************************/

It is hard to determine whether it is a block comment or a Javadoc, especially when it is written above a method, class, or any valid Javadoc position. Therefore, it cannot be classified unambiguously as either a block comment or a Javadoc.

@Praveen7294

Copy link
Copy Markdown
Contributor Author

@romani please review, i am going to participate in gsoc so working on new check will be very helpful for me.

Comment thread config/suppressions.xml
<!-- suppressed BlockCommentEndPosition in some files -->
<suppress checks="BlockCommentEndPosition"
files="[\\/]src[\\/]main[\\/]java[\\/]com[\\/]puppycrawl[\\/]tools[\\/]checkstyle[\\/]DefaultLogger.java"/>
<suppress checks="BlockCommentEndPosition"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You might also need to add suppression to pass CI

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i already created a PR sevntu-checkstyle/sevntu.checkstyle#1157. Do i need to suppress here?

@aclfe aclfe Mar 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I didn't know you had a PR up, that should be fine then! The violations seem minimal and I assume main files should be compliant rather than surpressed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

no problem

@romani

romani commented Mar 24, 2026

Copy link
Copy Markdown
Member

sevntu PR is merged, and this PR is rebased in web

@romani

romani commented Mar 24, 2026

Copy link
Copy Markdown
Member

GitHub, generate website

@Praveen7294 Praveen7294 force-pushed the javadoc branch 3 times, most recently from 416c53d to 550c129 Compare March 24, 2026 14:01
@Praveen7294

Praveen7294 commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

due to small changes in docs i am generating site again.

@Praveen7294

Copy link
Copy Markdown
Contributor Author

GitHub, generate website

@Praveen7294

Copy link
Copy Markdown
Contributor Author

@romani resolved all error and most of the ci is green, please review

@Praveen7294

Copy link
Copy Markdown
Contributor Author

GitHub, generate report

@github-actions

Copy link
Copy Markdown
Contributor

@Praveen7294 Praveen7294 force-pushed the javadoc branch 3 times, most recently from eb48ea5 to e83301b Compare March 31, 2026 16:01
@Praveen7294

Copy link
Copy Markdown
Contributor Author

@romani please review

@Praveen7294

Copy link
Copy Markdown
Contributor Author

@romani I have rebased this PR, please review

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.

4 participants