-
Notifications
You must be signed in to change notification settings - Fork 1
Validate and update links (STF-557) #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: Links | ||
|
|
||
| on: | ||
| push: | ||
| pull_request: | ||
| schedule: | ||
| - cron: "0 13 * * 1" # weekly, to catch external link rot without a commit | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| linkChecker: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup mise | ||
| uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1 | ||
| with: | ||
| install: false | ||
|
|
||
| # Install only lychee (not the repo's full toolchain) and run the check. | ||
| - name: Check links | ||
| env: | ||
| MISE_AUTO_INSTALL: "false" | ||
| run: | | ||
| mise install lychee | ||
| mise run check-links |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,64 @@ | ||||||
| # Lychee link checker configuration | ||||||
| # https://lychee.cli.rs/#/usage/config | ||||||
| # | ||||||
| # Run locally with: | ||||||
| # lychee './**/*.md' './**/*.kt' './**/*.java' | ||||||
|
|
||||||
| # Include URL fragments in checks | ||||||
| include_fragments = true | ||||||
|
|
||||||
| # Don't allow any redirects, so links that have moved are surfaced and can be | ||||||
| # updated to their canonical destination. | ||||||
| max_redirects = 0 | ||||||
|
|
||||||
| # Accept these HTTP status codes | ||||||
| # 100-103: Informational responses | ||||||
| # 200-299: Success responses | ||||||
| # 403: Forbidden (some sites use this for rate limiting) | ||||||
| # 429: Too Many Requests | ||||||
| # 500-599: Server errors (temporary issues shouldn't fail CI) | ||||||
| # 999: LinkedIn's custom status code | ||||||
| accept = ["100..=103", "200..=299", "403", "429", "500..=599", "999"] | ||||||
|
|
||||||
| # 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The current regular expression only matches GitHub blob URLs that contain a hexadecimal commit hash (due to
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 — Claude (posted on Greg's behalf) |
||||||
| # Live / auth-gated MaxMind endpoints: appear as code string literals or | ||||||
| # require login, so they can't be verified by an anonymous request. | ||||||
| '^https://geoip\.maxmind\.com', | ||||||
| '^https://minfraud\.maxmind\.com', | ||||||
| '^https://sandbox\.maxmind\.com', | ||||||
| '^https://www\.maxmind\.com/en/accounts/', | ||||||
| '^https://www\.maxmind\.com/en/account/login', | ||||||
| # Device-tracking API endpoints: live collection endpoints hit by the SDK, | ||||||
| # not browsable pages. | ||||||
| '^https?://d-ipv[46]\.mmapiws\.com', | ||||||
| # Placeholder example/test server hosts used in docstrings and unit tests | ||||||
| # (not real, resolvable endpoints). | ||||||
| '^https://custom\.maxmind\.com', | ||||||
| '^https://test\.maxmind\.com', | ||||||
| # Local / placeholder URLs (e.g. example hosts in docs and tests) | ||||||
| '^file://', | ||||||
| '^https?://example\.(com|org|net)', | ||||||
| '^http://localhost', | ||||||
| '127\.0\.0\.1', | ||||||
| ] | ||||||
|
|
||||||
| # Exclude file paths from getting checked (regular expressions, matched against | ||||||
| # the path relative to the working directory). Patterns are segment-anchored | ||||||
| # with (^|/) so short names like "build" don't match unintended paths. | ||||||
| exclude_path = [ | ||||||
| '(^|/)build/', | ||||||
| '(^|/)\.gradle/', | ||||||
| '(^|/)node_modules/', | ||||||
| # Changelog: historical entries are preserved as-is, not rewritten | ||||||
| '(^|/)CHANGELOG\.md$', | ||||||
| ] | ||||||
|
|
||||||
| # Cache results for 1 day to speed up repeated checks | ||||||
| cache = true | ||||||
| max_cache_age = "1d" | ||||||
|
|
||||||
| # Skip missing input files instead of erroring | ||||||
| skip_missing = true | ||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using generic link text like 'here' is an accessibility anti-pattern because it does not provide descriptive context for screen readers or users scanning the document. Consider using more descriptive link text that clearly indicates the destination.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pre-existing copy not changed by this PR (which only validates/updates link targets); leaving wording/accessibility edits out of scope here.
— Claude (posted on Greg's behalf)