[
https://issues.apache.org/jira/browse/LUCENE-9496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17189090#comment-17189090
]
Dawid Weiss commented on LUCENE-9496:
-------------------------------------
Somehow I knew you'd be interested. :) Playing with those compilation trees is
a lot of fun. It isn't exactly easy too so it's not a trivial effort but I have
a feeling it can be done.
> Replace (or accelerate) check-broken-links.gradle with a doclet pass
> --------------------------------------------------------------------
>
> Key: LUCENE-9496
> URL: https://issues.apache.org/jira/browse/LUCENE-9496
> Project: Lucene - Core
> Issue Type: Task
> Reporter: Dawid Weiss
> Priority: Minor
>
> 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
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]