RFR: JDK-8216319: Refactor JavadocTester to allow more on-by-default checkers; add A11YChecker
Jonathan Gibbons
jonathan.gibbons at oracle.com
Tue Jan 8 01:06:32 UTC 2019
Please review a medium-simple change to refactor JavadocTester to allow
more on-by-default checkers, and to introduce a new checker
The nested classes for HtmlParser and LinkChecker are moved out of
JavadocTester to become top-level classes; a new interface HtmlChecker
is introduced between HtmlParser and LinkChecker, and a new subtype of
that interface is added.
The A11YChecker is currently simple ... when enabled, it checks for
content outside of a region in HTML 5 files, and it checks for
out-of-order headings. We may want to add additional checks in future.
Architectural limitations in JavadocTester mean it is simpler/easier to
read each file for each checker, meaning that if both checkers are
enabled, the files will be read/parsed twice. This is in contrast to
DocCheck where each file is read once and the checkers are run in
parallel. However, relatively speaking the number and size of the files
is small (compared to, say, the JDK API docs), and the overhead is not
noticeable, and preferable to any more substantial refactoring of
JavadocTester at this time.
A11yChecker is not enabled by default at this time: it finds lots of
errors related to out-of-order headings; however, it is expected that
when we fix that issue, A11yChecker will then be enabled by default.
-- Jon
JBS: https://bugs.openjdk.java.net/browse/JDK-8216319
Webrev: http://cr.openjdk.java.net/~jjg/8216319/webrev.00/
More information about the javadoc-dev
mailing list