On Fri, 18 Aug 2023 11:30:27 GMT, Pavel Rappo <[email protected]> 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
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/taglets/TagletManager.java
line 361:
> 359: };
> 360: if (name == null) {
> 361: continue; // not a tag
There is room for future evolution of the `DocTree` API here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15345#discussion_r1298577370