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

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

    [ https://issues.apache.org/jira/browse/LUCENE-9496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17189045#comment-17189045 ] 

Tomoko Uchida commented on LUCENE-9496:
---------------------------------------

bq. 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.

+1. Porting the external link checker script to Java code would be easier task than the missing docs check script, I think. I'd give it a try... 

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