RFR: 8314448: Coordinate DocLint and JavaDoc to report on unknown tags

Jonathan Gibbons jjg at openjdk.org
Fri Aug 18 15:39:26 UTC 2023


On Fri, 18 Aug 2023 11:30:27 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

> Please review this bug fix for reporting on unknown javadoc tags.
> 
> Aside from a somewhat irrelevant test for DocLint[^1], there are no direct tests for reporting on unknown javadoc tags. That reporting, as it turns out, is ridden with bugs. This PR fixes quite a few of those bugs and adds missing tests.
> 
> Note, that a test for miscased tags (i.e. "{0} is an unknown tag -- same as a known tag except for case") is not added, as the matching mechanism is to be superseded by a more general one, based on a string distance function, in [JDK-8288660](https://bugs.openjdk.org/browse/JDK-8288660).
> 
> Also note, that while javadoc emits a warning on an unknown tag, DocLint emits an error. I haven't changed warning to error in javadoc for (better) backward compatibility. This way, an unknown tag won't fail javadoc run (unless of course `-Werror` is specified). That said, in the future this decision may be revised.
> 
> [^1]: test/langtools/tools/doclint/CustomTagTest.java

Marked as reviewed by jjg (Reviewer).

-------------

PR Review: https://git.openjdk.org/jdk/pull/15345#pullrequestreview-1584799558


More information about the javadoc-dev mailing list