Skip to content

Comments

Issue #18570: Add new PreferJavadocInlineTagsCheck#18906

Open
vivek-0509 wants to merge 1 commit intocheckstyle:masterfrom
vivek-0509:newCheckPreferJavadocInlineTags
Open

Issue #18570: Add new PreferJavadocInlineTagsCheck#18906
vivek-0509 wants to merge 1 commit intocheckstyle:masterfrom
vivek-0509:newCheckPreferJavadocInlineTags

Conversation

@vivek-0509
Copy link
Contributor

Issue #18570:
Adds a new Javadoc check PreferJavadocInlineTags that enforces the use of Javadoc inline tags over their HTML equivalents, as recommended by OpenJDK Style Guidelines v6.

What does this check flag?

  • <code>...</code> -> {@code ...}
  • <a href="#..."> (internal links) -> {@link ...}
  • &lt; -> {@literal <}
  • &gt; -> {@literal >}

What is NOT flagged (skipped)?

  • Block-level HTML tags with no Javadoc equivalent: <p>, <pre>, <ul>, <li>, <table>, etc.
  • External URLs: <a href="https://...">
  • Content inside <pre> blocks
  • Content inside {@code} and {@literal} inline tags

New module config: https://gist.githubusercontent.com/vivek-0509/7405297ffbf34d9007e52d45d7e9ff67/raw/589e62c2a2e5e670b45d538272f04faacc7b36f2/preferjavadocinlineTags.xml

Contirbution repo PR: checkstyle/contribution#1030

@vivek-0509 vivek-0509 marked this pull request as draft February 10, 2026 14:29
@vivek-0509
Copy link
Contributor Author

GitHub, generate report

@github-actions
Copy link
Contributor

@vivek-0509 vivek-0509 force-pushed the newCheckPreferJavadocInlineTags branch from 95f5915 to fb5a109 Compare February 13, 2026 15:09
@vivek-0509 vivek-0509 marked this pull request as ready for review February 13, 2026 15:37
@vivek-0509
Copy link
Contributor Author

vivek-0509 commented Feb 13, 2026

@romani https://checkstyle.semaphoreci.com/jobs/139cba1a-3511-43c2-ac89-6dab0b03c85c
Should I also send a supplemental PR to sevntu.checkstyle to fix the violation caused by this new check???

@vivek-0509
Copy link
Contributor Author

@romani ping

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.

1 participant