-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
JavadocParagraph does not work when paragraphs have their corresponding closing tag #15685
Labels
Milestone
Comments
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Sep 21, 2024
…g when they have their corresponding closing tag
I've sent PR for this issue, when I tried to run build command locally, I got so many errors for different files like checks, filters, etc for
I want your help with this one, not sure how to fix it. |
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Sep 24, 2024
…g when they have their corresponding closing tag
romani
added
the
false negative
issues where check should place violations on code, but does not
label
Sep 24, 2024
github-project-automation
bot
moved this from In Progress
to Done
in Refine Google Style Guide
Sep 27, 2024
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Sep 27, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Sep 27, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 2, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 2, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 3, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 3, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 4, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 4, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 4, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 5, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 5, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 5, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 6, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 6, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 6, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 6, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 7, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 7, 2024
…g when they have their corresponding closing tag
2 tasks
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 8, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 8, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 8, 2024
…g when they have their corresponding closing tag
romani
pushed a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 10, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 10, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 10, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 10, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 10, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 10, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 10, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 10, 2024
…g when they have their corresponding closing tag
Zopsss
added a commit
to Zopsss/checkstyle
that referenced
this issue
Oct 11, 2024
…g when they have their corresponding closing tag
romani
pushed a commit
that referenced
this issue
Oct 11, 2024
…y have their corresponding closing tag
github-project-automation
bot
moved this from In Progress
to Done
in Refine Google Style Guide
Oct 11, 2024
MohanadKh03
pushed a commit
to MohanadKh03/checkstyle
that referenced
this issue
Oct 18, 2024
…g when they have their corresponding closing tag
MohanadKh03
pushed a commit
to MohanadKh03/checkstyle
that referenced
this issue
Oct 18, 2024
…g when they have their corresponding closing tag
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
I have read check documentation: https://checkstyle.org/checks/javadoc/javadocparagraph.html
I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run
I have executed the cli and showed it below, as cli describes the problem better than 1,000 words
Detected at: #15503 (comment)
In JavadocParagraph's implementation, we're only checking for
P
tags which aren't closed, i.e we're checking only for<p>
which doesn't have corresponding</p>
.There is a difference in parsed AST when
P
have its corresponding closing tag and when it doesn't have it. As explained in the above referenced comment, AST forP
when it is not closed looks like this:and when it is properly closed, it looks like this:
A new
PARAGRAPH
appears between the token.What we do in the Check's implementation:
checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocParagraphCheck.java
Lines 147 to 156 in d07072b
We check if after
HTML_ELEMENT
is there aP_TAG_START
token? This token is for opening paragraph tag (<p>
). If yes then move further.This case is only valid for
<p>
tags which does not have their corresponding</p>
, so when we encounter a proper pair of paragraph tag (<p></p>
), our check ignores that paragraph as a new token (PARAGRAPH
) appears betweenHTML_ELEMENT
&P_TAG_START
.Example:
We get errors only for
<p>
which are not closed, we don't get any violations for<p>
which are closed properly. We expect the same errors as we got for<p>
Describe what you expect in detail.
Fix the check's implementation to check for both types of tags:
<p>
&<p></p>
The text was updated successfully, but these errors were encountered: