-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
New Javadoc module for checking preceding <p> tag for block level tags #15458
Comments
First and foremost we should update https://checkstyle.org/checks/javadoc/javadocparagraph.html#JavadocParagraph to not demand (place violation) before block tags. Let's keep this issue for update to existing Check. We can extend this Check to report on extra P tags. This Check was created fot google style. |
I don't get it. The guide says that there should be a blank line
Agree, this part |
rule is:
I pretty sure this JavadocParagraph is simply demand
|
we have bigger problem. checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocParagraphCheck.java Lines 152 to 154 in 66ba088
this Check does validation only if P tag is present. But Google rule is not about valdiation of P tag, it demands P tag to be present after empty line I vote to update JavadocParagraph to raise violations on 2 new cases:
|
Sounds good to me. I don't think we need a new check, let's update |
@Zopsss , please close this issue and create new issue on update of existing Check. |
From https://github.com/checkstyle/checkstyle/pull/14901/files#r1622428372
Investigated at :
#15011 (comment) (there are screenshots of javadoc with extra P tag)
7.1.2 Paragraphs rule of google java style guide states that there should not be preceding
<p>
tag for block tags:Whole rule:
We currently have no support to check this, there's also a message explaining this gap in our config at coverage table:
So we need a new Check to ensure we follow this rule. It will be javadoc check, it can named something like:
JavadocInvalidParagraphPosition
( suggestions are welcomed )How it should work?
This is a list of block-level tags in HTML:
source w3 schools: https://www.w3schools.com/html/html_blocks.asp
We should check if
<p>
is not preceding any of such block level tags which are used in javadoc.Example:
Config:
Output:
The warning is given for the block tag, explaining the tag is preceded by
<p>
which is not allowed.Additional context
The coverage table website is generated by
GitHub, generate site
. We have not released new version so the live website does not contain explaining message, you won't be able to see it there.The text was updated successfully, but these errors were encountered: