You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Dawid Weiss (Jira)" <ji...@apache.org> on 2020/09/01 19:58:00 UTC

[jira] [Created] (LUCENE-9496) Replace (or accelerate) check-broken-links.gradle with a doclet pass

Dawid Weiss created LUCENE-9496:
-----------------------------------

             Summary: 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


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: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org