Skip to content

Issue #18486: Fix false positive in JavadocParagraph for tags#18814

Open
Shubhamyadav93 wants to merge 2 commits into
checkstyle:masterfrom
Shubhamyadav93:issue-18486-fix-javadoc-paragraph
Open

Issue #18486: Fix false positive in JavadocParagraph for tags#18814
Shubhamyadav93 wants to merge 2 commits into
checkstyle:masterfrom
Shubhamyadav93:issue-18486-fix-javadoc-paragraph

Conversation

@Shubhamyadav93

Copy link
Copy Markdown

This PR addresses a false positive in the JavadocParagraph check where it incorrectly reported a violation for <p> tags that were preceded by an empty line but followed a block tag (such as @return or @param).

The fix ensures that the check correctly identifies the start of a new paragraph within block tags when the mandatory empty line is present.

Relation to existing issues
Fixes #18486

Observation for Reviewers
While working on this fix, a few changes related to pattern variables for Issue #10969 were included in this branch due to a local workspace overlap. I have kept the focus on #18486, but please let me know if you would like me to revert the unrelated changes or if they can stay as part of this PR.

Testing performed
Added regression test case in JavadocParagraphCheckTest.java
Created input file InputJavadocParagraphLineBeforeAfterBlockTag.java with the failing scenario
Verified that all tests pass locally using mvn test

@romani

romani commented Feb 2, 2026

Copy link
Copy Markdown
Member

Please read and watch videos at Starting_Development.
Please make CI green.

@Shubhamyadav93

Copy link
Copy Markdown
Author

Hi @romani, thank you for the feedback and the resources. I am going through the 'Starting Development' guide now. I will check the failing CI tests locally and push the fixes soon to make the build green.

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.

False positive: JavadocParagraph reports violation when <p> is after tags

3 participants