Issue #20984: Added new check PreferLiteralJavadocInlineTag - #20397
Issue #20984: Added new check PreferLiteralJavadocInlineTag#20397Aman-Baliyan wants to merge 1 commit into
Conversation
|
Github, generate report |
|
please address CI failures |
|
please read #18570 (comment) we need new property |
|
on next report generation, please generate report for config without snippet, to keep diff smaller to let us review. |
|
blocked until we finish coverage table |
|
Github, generate report |
|
Github, generate site |
|
@romani what jdkVersion should we use in checkstyle-checks.xml. Is it 25 or below 18? |
|
I do not understand why we need update anything . we use jdk21, all jdk25 source goes to non-compiled folders ok I see, semaphore .... please send supplemental PR to fix this, we eat food we produce, if we can not fix violation, it means Check has problems in design. sevntu still on jdk11, I hope to upgrade it to jdk21 after release of 13.9.0. |
| <suppress checks="JavadocStyle" files="JavadocParagraphCheck\.java"/> | ||
|
|
||
| <!-- Suppress PreferJavadocInlineTags for all files --> | ||
| <suppress checks="PreferJavadocInlineTags"/> |
There was a problem hiding this comment.
we need to come back to it, we should fix all Inputs of Openjdk for sure.
please point to few problems link and violation with others
There was a problem hiding this comment.
we need to come back to it, we should fix all Inputs of Openjdk for sure.
please point to few problems link and violation with others
ok i will create a issue for this.
|
|
||
| <!-- JavadocStyle incorrectly parses HTML tags inside {@code} blocks --> | ||
| <suppress checks="JavadocStyle" | ||
| files="PreferJavadocInlineTagsCheck\.java"/> |
There was a problem hiding this comment.
remove this , JavadocStyle is removed.
There was a problem hiding this comment.
remove this , JavadocStyle is removed.
done
|
|
||
| <!-- JavadocStyle incorrectly parses HTML tags inside {@literal}, {@code} blocks as real HTML, | ||
| until #19145 --> | ||
| <suppress checks="JavadocStyle" files="JavadocParagraphCheck\.java"/> |
|
|
||
| <!-- EscapedEntity is an error-prone warning, needs @SuppressWarnings to suppress --> | ||
| <suppress checks="SuppressWarnings" | ||
| files="PreferJavadocInlineTagsCheck\.java"/> |
There was a problem hiding this comment.
please share details, it is very unusual ....
There was a problem hiding this comment.
please share details, it is very unusual ....
PreferInlineJavadocTagsCheck file contains escaped entity which needs to be suppressed.
I have used the suppression annotation then i got violation from suppression check that's why i have used this
sorry the message #20397 (comment) is not clearly written. i am asking that i have added a new property The violations are -> https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/1dbbeec_2026171053/reports/diff/checkstyle/index.html |
if it is on jdk11 then violation for |
|
yes, it will good example on what update is expected for jdk21 and for jdk18. Pretty sad that fixes are different. |
Example -> if we use jdkVersion >= 18 then we have to change the Although there is a advantage of using snippet tag because we do not need escaping characters inside it like pre. |
|
working on ci/semaphore failures. |
|
@Aman-Baliyan , what is refactoring for jdk < 18 ? is it same but ok, I see: now I am thinking that we do not need to new property.
So there is two migrations: World is moved to jdk21, so all new javadoc tags are already out and this is most used jdk in world. old code will continue to stay with old jdk, no need to change that legacy code that works and docs are written. So our logic should be fully focus on chunks that are multi-line or single-line and suggest to upgrade. May be in future users will ask us to make special property to always demand Do you agree with me ? |
i agree with u. |
|
up to you, you can close this PR and start new to not be confusing, might be the best approach. start from PreferJavadocLiteralInlineTags (sounds like easy Check), then PreferJavadocCodeOrSnippetInlineTags PreferLinkJavadocInlineTag is not clear for me, lets have issue creation for now and share there details .. |
as this pr contains a lot of work so better option is to change its description and names only . I will changed it to |
|
i will create a parent a umbrella issue for these check and create sub-issues for literal, link and code. |
|
Current Implementation of this check -> This check will flag -> |
|
@romani , according to current implementation we takes a text line traverse the line through loops and through violations for each entity found. Is this good? By example -> Current , // 4 violations: Should i change it to only 2 violations -> // 'Prefer Javadoc inline tag '{@literal <}' over '<'.' |
Issue: #20984
Added a new check PreferLiteralJavadocInlineTag.
New module config: https://gist.githubusercontent.com/Aman-Baliyan/7d0a749fed4e1fb4877a93d8e42207d8/raw/7fb86f4410bf8fb83a66f979d05bb00bb9efa944/preferinlinetag.config
contribution-repo pr: checkstyle/contribution#1083