Details
-
Task
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
-
New
Description
This is just a placeholder, but perhaps somebody will find the time to push this forward. The current python script in check-broken-links reparses all emitted HTML files to find links. I have a strong feeling this could be done better.
Javadoc doclets have access to parse trees for both the code and the javadoc comments (including information about HTML tags, code links, etc.). For example, this information is used by the built-in javac HTML linter.
Maybe we could replace the python linter entirely; verify where code links will point at, where existing HTML links point to and validate this information. I wrote some of that link-parsing code in Carrot2 (to convert javadocs into a structured JSON format used in other documentation). The code there is free to eyeball and borrow, if needed.
https://docs.oracle.com/en/java/javase/11/docs/api/jdk.compiler/com/sun/source/util/DocTreeScanner.html
https://github.com/carrot2/carrot2/blob/master/infra/jsondoclet/src/main/java/com/carrotsearch/jsondoclet/JavaDocsVisitor.java#L135
https://github.com/carrot2/carrot2/blob/master/infra/jsondoclet/src/main/java/com/carrotsearch/jsondoclet/PlainReferenceConverter.java
Attachments
Issue Links
- relates to
-
LUCENE-9215 replace checkJavaDocs.py with doclet
- Closed