Validate and update links (STF-557)#501
Conversation
Modver resultThis report was generated by Modver, This PR does not require a change in your module’s version number. |
There was a problem hiding this comment.
Code Review
This pull request introduces a Lychee link checker configuration file (lychee.toml), adds .lycheecache to .gitignore, and updates various outdated or redirected URLs across documentation, configuration templates, and test files. The reviewer suggested a useful improvement to the regular expression in lychee.toml for excluding GitHub blob URLs with line numbers, pointing out that the current pattern only matches hexadecimal commit SHAs and should be broadened to support branch names and tags.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| # Exclude URL patterns from checking (treated as regular expressions) | ||
| exclude = [ | ||
| # GitHub blob URLs with line-number fragments (not parseable as page anchors) | ||
| '^https://github\.com/[^/]+/[^/]+/blob/[0-9a-fA-F]+/.+#L\d+$', |
There was a problem hiding this comment.
The regular expression for excluding GitHub blob URLs with line numbers uses [0-9a-fA-F]+ to match the git reference (commit SHA). However, this will not match branch names (like main, master, dev) or tags (like v1.0.0) because they contain non-hexadecimal characters. As a result, any links to specific lines on branches or tags will not be excluded and may cause lychee to fail during CI due to dynamic fragment loading on GitHub.
Using [^/]+ instead of [0-9a-fA-F]+ will correctly match any branch, tag, or commit SHA.
| '^https://github\.com/[^/]+/[^/]+/blob/[0-9a-fA-F]+/.+#L\d+$', | |
| '^https://github\.com/[^/]+/[^/]+/blob/[^/]+/.+#L\d+$', |
There was a problem hiding this comment.
This GitHub-blob exclude is taken verbatim from the dev-site lychee config and is intentionally narrow — it only skips unverifiable blob/<sha>#L.. line-fragment links. Branch-ref blob links are checked normally and resolve fine in these repos, so we kept the shared pattern.
— Claude (posted on Greg's behalf)
f97ad8a to
6665fc6
Compare
Adds a lychee configuration and a Links GitHub Actions workflow so that stale or redirecting links are caught automatically going forward. The checker runs on push, pull request, and weekly to catch external link rot. max_redirects is 0 so links that have moved are surfaced and can be updated to their canonical destination. Part of STF-557. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Validated all links with lychee and updated those that were out of date or redirected elsewhere: - dev.maxmind.com doc URLs now use canonical trailing-slash form - golang.org -> go.dev - www.maxmind.com/en/my_license_key (404) -> /en/accounts/current/license-key - www.maxmind.com/en/geoip2-services-and-databases -> /en/solutions/ip-geolocation-databases-api-services - support.maxmind.com/hc/en-us/articles/... -> support.maxmind.com/knowledge-base/articles/download-and-update-maxmind-databases The GeoIP.conf.default source and its config_test.go fixtures were kept in sync. github.com/settings/ (login-gated) and the http://test / http://Garbage:1080 proxy test placeholders are excluded as false positives. Historical CHANGELOG.md entries are intentionally left unchanged. Part of STF-557. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Resolves zizmor ref-version-mismatch warnings on hash-pinned actions whose version comments omitted the leading v (the pinned commits already match the corresponding vX.Y.Z tags). Comment-only change. Part of STF-557. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds a lychee link-checker configuration and a
LinksGitHub Actions workflow (push / pull_request / weekly schedule /manual), then validates and updates the stale and redirecting links found
across the repo's Markdown and Go sources.
Link updates
dev.maxmind.com/geoip/updating-databases?lang=en->.../updating-databases/?lang=en(README.md x2, config_test.go x3, GeoIP.conf.default)dev.maxmind.com/geoip/upgrading-geoip-update?lang=en->.../upgrading-geoip-update/?lang=en(README.md)dev.maxmind.com/geoip/updating-databases#3-run-geoip-update->.../updating-databases/#3-run-geoip-update(doc/geoipupdate.md)golang.org->go.dev(README.md)www.maxmind.com/en/my_license_key(404) ->www.maxmind.com/en/accounts/current/license-key(config_test.go x3, GeoIP.conf.default)www.maxmind.com/en/geoip2-services-and-databases->www.maxmind.com/en/solutions/ip-geolocation-databases-api-services(doc/geoipupdate.md)support.maxmind.com/hc/en-us/articles/4408216129947-Download-and-Update-Databases#...->support.maxmind.com/knowledge-base/articles/download-and-update-maxmind-databases(doc/geoipupdate.md)The
conf/GeoIP.conf.defaultsource and theconfig_test.gofixtures thatmirror it were updated together to stay in sync.
False positives excluded in lychee.toml
github.com/settings/— redirects anonymous requests to the login flowhttp://testandhttp://Garbage:1080— placeholder proxy/host values in config parser testsmax_redirects = 0and500..=599inacceptare intentional (matches thedev-site/blog-site configs). Historical
CHANGELOG.mdentries are excluded fromscanning and left unchanged.
lychee summary after fixes:
19 OK, 0 Errors, 28 Excluded. Repo preciouslinter (golangci-lint + prettier) passes and
go test ./internal/geoipupdate/is green.
Part of STF-557.
🤖 Generated with Claude Code