Skip to content

Issue #20610: remove JavadocStyleCheck - #20582

Merged
romani merged 1 commit into
checkstyle:masterfrom
gianmarcoschifone:style
Jul 12, 2026
Merged

romani merged 1 commit into
checkstyle:masterfrom
gianmarcoschifone:style

Conversation

@gianmarcoschifone

@gianmarcoschifone gianmarcoschifone commented Jul 5, 2026 •

Copy link
Copy Markdown
Member

closes #20610

Contribution PR: checkstyle/contribution#1085

@gianmarcoschifone

Copy link
Copy Markdown
Member Author

GitHub, generate report

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

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

@gianmarcoschifone

Copy link
Copy Markdown
Member Author

GitHub, generate report

@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

@romani

romani commented Jul 6, 2026 •

Copy link
Copy Markdown
Member

@gianmarcoschifone , please open issue on this false positive
https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/653374d_2026180314/reports/diff/openjdk25/index.html#A28

this covered at https://checkstyle.org/checks/javadoc/summaryjavadoc.html#SummaryJavadoc a way better
we will remove this validation from this Check, it will be braking change but it is for good.
There are two properties in this Check to cover first sentence, uhhh, it will be painful breaking change.

@romani

romani commented Jul 6, 2026

Copy link
Copy Markdown
Member

as we remove properties already from this Check, lets remove fist sentence validation also and two properties for it.
lets mess users config only ones.

@romani

romani commented Jul 6, 2026

Copy link
Copy Markdown
Member

GitHub, generate website

@gianmarcoschifone

Copy link
Copy Markdown
Member Author

as we remove properties already from this Check, lets remove fist sentence validation also and two properties for it. lets mess users config only ones.

@romani So this check will only be used for checking empty Javadoc?

@romani

romani commented Jul 6, 2026 •

Copy link
Copy Markdown
Member

Such a use less role ....

I even do not see what vilation it produces on empty.
https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/653374d_20260706135207/checks/javadoc/javadocstyle.html#Example7-config

// violation below 'Javadoc has empty description section'
/**
*/
public void method16() {}

do we have other Check that cover this validation ?

We can remove it completely but we have to give users something instead. I think summary
https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/653374d_20260706135207/checks/javadoc/summaryjavadoc.html also covers empty, if it is enabled. right ?

@mahfouz72

mahfouz72 commented Jul 6, 2026 •

Copy link
Copy Markdown
Member

javadoc.empty=Javadoc has empty description section. (Summary Javadoc does similar thing with different message)
javadoc.extraHtml=Extra HTML tag found: {0}. (No examples for this in docs)
javadoc.incompleteTag=Incomplete HTML tag found: {0}. (Not sure if we need this)
javadoc.noPeriod=First sentence should end with a period. (covered by summary.javaDoc.missing.period ) - Should be removed from this check

@gianmarcoschifone Please share examples how extraHtml and incompleteTag works and whether any check cover them or not

@gianmarcoschifone

gianmarcoschifone commented Jul 6, 2026 •

Copy link
Copy Markdown
Member Author

@gianmarcoschifone Please share examples how extraHtml and incompleteTag works and whether any check cover them or not

@mahfouz72 I had shared here some information, please see: #19145 (comment)
#19145 (comment)

@gianmarcoschifone gianmarcoschifone changed the title Issue #19145: update JavadocStyleCheck to use AST of javadoc Issue #19145: remove JavadocStyleCheck Jul 7, 2026
@gianmarcoschifone
gianmarcoschifone force-pushed the style branch 4 times, most recently from e63c87d to 66db00f Compare July 7, 2026 11:35
@romani

romani commented Jul 7, 2026 •

Copy link
Copy Markdown
Member

https://app.circleci.com/pipelines/github/checkstyle/checkstyle/47965/workflows/c392718f-76c3-458b-9d67-9d160600a9dc/jobs/1637518

Checkout Hazelcast sources...
Cloning into 'hazelcast'...
remote: Enumerating objects: 14368, done.        
remote: Counting objects: 100% (14368/14368), done.        
remote: Compressing objects: 100% (7630/7630), done.        
remote: Total 14368 (delta 6776), reused 8526 (delta 6250), pack-reused 0 (from 0)        
Receiving objects: 100% (14368/14368), 22.58 MiB | 21.18 MiB/s, done.
Resolving deltas: 100% (6776/6776), done.
Updating files: 100% (12463/12463), done.
Running Checkstyle on Apache-licensed modules...
com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module TreeWalker
        - cannot initialize module JavadocStyle
        at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:481)
        at com.puppycrawl.tools.checkstyle.AbstractAutomaticBean.configure(AbstractAutomaticBean.java:210)
        at com.puppycrawl.tools.checkstyle.Main.runCheckstyle(Main.java:425)
        at com.puppycrawl.tools.checkstyle.Main.runCli(Main.java:347)
        at com.puppycrawl.tools.checkstyle.Main.execute(Main.java:205)
        at com.puppycrawl.tools.checkstyle.Main.main(Main.java:129)
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module JavadocStyle
        at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:155)
        at com.puppycrawl.tools.checkstyle.AbstractAutomaticBean.configure(AbstractAutomaticBean.java:210)
        at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:476)
        ... 5 more
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to instantiate 'JavadocStyle' class, it is also not possible to instantiate it as .JavadocStyle, JavadocStyleCheck, .JavadocStyleCheck. Please recheck that class name is specified as canonical name or read how to configure short name usage https://checkstyle.org/config.html#Packages. Please also recheck that provided ClassLoader to Checker is configured correctly.
        at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:212)
        at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:148)
        ... 7 more
Checkstyle ends with 1 errors.

this means that Check is in use ..... and we need to migrate this project off JavadocStyle.
As soon as we create PR for them with such check removal (make sure we put SummaryJavadoc if not used), we can update our CI to reference to such PR code for checkout, so CI will become green.
This will give us clear feedback from users on migration. If we migrate such few projects, it will likely means that all others have no much problems. In migration notes we will share link to such migrations for reference.

no-exception-xxxxx

we just need to update our configs in https://github.com/checkstyle/contribution/tree/master/checkstyle-tester

verify-no-exception-config

this needs to be hacked a bit to exclude Check we remove.

devOpsHazelcast pushed a commit to hazelcast/hazelcast that referenced this pull request Jul 7, 2026
Import of #26600

**Original PR description:**

Removes `JavadocStyle` from the Checkstyle configuration because the
check is being removed from Checkstyle in PR
checkstyle/checkstyle#20582.

No replacement is added because both first-sentence and HTML checks were
disabled in this config.

### Migration note

`JavadocStyle` is removed because its remaining useful validations are
already covered elsewhere.

Users who relied on the first-sentence/period-at-end validation or empty
Javadoc validation should use
[`SummaryJavadoc`](https://checkstyle.org/checks/javadoc/summaryjavadoc.html)
instead. HTML tag validation is intentionally not replaced here, as it
will be handled automatically by `SummaryJavadoc` while parsing Javadoc
comments.

Imported changes:

- 8823d75 Remove obsolete JavadocStyle
check

Closes #26600

Co-authored-by: gianmarco <[email protected]>
GitOrigin-RevId: ff0a5d2530ad2336bb9d70ef12089cb11f1302ea
@gianmarcoschifone
gianmarcoschifone force-pushed the style branch 5 times, most recently from ed19485 to 2f81714 Compare July 8, 2026 12:44
@gianmarcoschifone
gianmarcoschifone marked this pull request as ready for review July 8, 2026 13:07
@gianmarcoschifone gianmarcoschifone changed the title Issue #19145: remove JavadocStyleCheck Issue #20610: remove JavadocStyleCheck Jul 8, 2026
@gianmarcoschifone
gianmarcoschifone force-pushed the style branch 2 times, most recently from 9396773 to 146ffcf Compare July 8, 2026 14:37
@romani

romani commented Jul 8, 2026

Copy link
Copy Markdown
Member

please rebase to address f9e87e3

@romani

romani commented Jul 8, 2026

Copy link
Copy Markdown
Member

@gianmarcoschifone , please remove usage of your forks+branch for projects where your PRs are merged.

@gianmarcoschifone

Copy link
Copy Markdown
Member Author

@romani can be done for all but not htmlunit, because CI will fail cause of new violations for summaryjavadoc introduction.
HtmlUnit/htmlunit#1149 (comment)
HtmlUnit/htmlunit#1149 (comment)

@gianmarcoschifone
gianmarcoschifone force-pushed the style branch 3 times, most recently from d2e6059 to 6e0cc30 Compare July 9, 2026 18:11

@mahfouz72 mahfouz72 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Please add the configs to the issue description showing how to use SummaryJavadoc to replace the removed check. This will help users migrate.

@gianmarcoschifone

Copy link
Copy Markdown
Member Author

@mahfouz72 in issue description there is currently:

Migration guidance

Users should remove:

<module name="JavadocStyle"/>

If they want to keep first sentence and empty Javadoc validation, they should add:

<module name="SummaryJavadoc"/>

could you please specify better what you want me to add?

@mahfouz72

Copy link
Copy Markdown
Member

@gianmarcoschifone, this is good, and this is what I meant. Sorry, I didn’t notice this, I was looking at the old issue.

@romani

romani commented Jul 10, 2026

Copy link
Copy Markdown
Member

@gianmarcoschifone , please rebase.

@romani romani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

All good. Consider it as done.

I will find proper time to merge it, we need to release all that we merged from last release not let users upgrade without big breaking changes.

@gianmarcoschifone

Copy link
Copy Markdown
Member Author

after #20663 I will rebase this otherwise it will keep having conflicts

@mahfouz72

Copy link
Copy Markdown
Member

@gianmarcoschifone PR is merged can you rebase now?

@romani romani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I will find good time to merge, I am waiting few PRs to be merged to make release.

@gianmarcoschifone

Copy link
Copy Markdown
Member Author

rebased

@romani
romani merged commit b8ee7aa into checkstyle:master Jul 12, 2026
132 of 133 checks passed
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.

Remove JavadocStyle check, use SummaryJavadoc Check instead

3 participants