golang/go

all: builders and TryBots should check documentation for broken links

Open

#37.047 aperta il 5 feb 2020

Vedi su GitHub
 (9 commenti) (5 reazioni) (0 assegnatari)Go (19.008 fork)batch import
BuildersDocumentationNeedsInvestigationTestinghelp wanted

Metriche repository

Star
 (133.883 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

We occasionally end up with broken or outdated links in documentation (see #46545, https://github.com/golang/go/issues/37042#issuecomment-582448476, #27860, #21951, #19244).

Testing for broken links would not be entirely trivial, but nonetheless pretty straightforward to implement: we have an HTML parser in golang.org/x/net/html, and it is easy enough to issue a HEAD request for link targets to see if they resolve. (For links with anchors, we would probably want to also check the Content-Type header and then parse the actual linked HTML to ensure that the anchor exists.)

CC @golang/osp-team

Guida contributor