RFR: 8314448: Coordinate DocLint and JavaDoc to report on unknown tags
Pavel Rappo
prappo at openjdk.org
Fri Aug 18 11:37:45 UTC 2023
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
-------------
Commit messages:
- fix: add tests
- fix: improve `assert` in checkUnknownTag
- fix: coordinate DocLint with JavaDoc
- fix: do not stop on first disabled tag
- refactor: rearrange comments
- refactor: remove redundant check
- fix: check unknown tags
- refactor: delete dead code
- refactor: declare a variable closer to use
- refactor: share `continue`
Changes: https://git.openjdk.org/jdk/pull/15345/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15345&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8314448
Stats: 194 lines in 4 files changed: 126 ins; 18 del; 50 mod
Patch: https://git.openjdk.org/jdk/pull/15345.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/15345/head:pull/15345
PR: https://git.openjdk.org/jdk/pull/15345
More information about the javadoc-dev
mailing list