Skip to content

Validate and update links (STF-557)#501

Merged
horgh merged 3 commits into
mainfrom
greg/stf-557
Jun 5, 2026
Merged

Validate and update links (STF-557)#501
horgh merged 3 commits into
mainfrom
greg/stf-557

Conversation

@oschwald
Copy link
Copy Markdown
Member

@oschwald oschwald commented Jun 4, 2026

Adds a lychee link-checker configuration and a
Links GitHub 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.default source and the config_test.go fixtures that
mirror it were updated together to stay in sync.

False positives excluded in lychee.toml

  • github.com/settings/ — redirects anonymous requests to the login flow
  • http://test and http://Garbage:1080 — placeholder proxy/host values in config parser tests

max_redirects = 0 and 500..=599 in accept are intentional (matches the
dev-site/blog-site configs). Historical CHANGELOG.md entries are excluded from
scanning and left unchanged.

lychee summary after fixes: 19 OK, 0 Errors, 28 Excluded. Repo precious
linter (golangci-lint + prettier) passes and go test ./internal/geoipupdate/
is green.

Part of STF-557.

🤖 Generated with Claude Code

Comment thread .github/workflows/links.yml Fixed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

Modver result

This report was generated by Modver,
a Go package and command that helps you obey semantic versioning rules in your Go module.

This PR does not require a change in your module’s version number.
(You might still consider bumping the patchlevel anyway.)

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread lychee.toml
# 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+$',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
'^https://github\.com/[^/]+/[^/]+/blob/[0-9a-fA-F]+/.+#L\d+$',
'^https://github\.com/[^/]+/[^/]+/blob/[^/]+/.+#L\d+$',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment thread .github/workflows/links.yml Fixed
@oschwald oschwald force-pushed the greg/stf-557 branch 2 times, most recently from f97ad8a to 6665fc6 Compare June 4, 2026 20:36
oschwald and others added 3 commits June 4, 2026 22:01
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>
@horgh horgh merged commit 795f6cb into main Jun 5, 2026
23 checks passed
@horgh horgh deleted the greg/stf-557 branch June 5, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants