golang/go

all: builders and TryBots should check documentation for broken links

Open

#37,047 opened on Feb 5, 2020

View on GitHub
 (9 comments) (5 reactions) (0 assignees)Go (19,008 forks)batch import
BuildersDocumentationNeedsInvestigationTestinghelp wanted

Repository metrics

Stars
 (133,883 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

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

Contributor guide