Use flint for link checking#16270
Merged
trask merged 1 commit intoopen-telemetry:mainfrom Feb 24, 2026
Merged
Conversation
Member
Author
|
@trask This is a small PR to try out flint for link checking here. Flint is basically a generalization of the link check scripts I originally created in opentelemetry-java-contrib — packaged as reusable mise tasks with some improvements. Key differences from the current setup:
I kept this intentionally minimal — just link checking. Happy to discuss if you have any concerns about the approach or the dependency on grafana/flint. |
3 tasks
zeitlinger
added a commit
to grafana/flint
that referenced
this pull request
Feb 23, 2026
## Summary - Strip line-number anchors (`#L123`, `#L10-L20`) from ALL GitHub `/blob/` URLs (any repo), so the file is still checked but the JS-rendered fragment is skipped - Exclude issue comment anchors (`#issuecomment-*`) globally — these are JS-rendered and cannot be verified by lychee - Remove the global `lychee#1729` remap workaround from flint's own `lychee.toml` (now handled by the script) - Add test cases for both patterns This means consuming repos no longer need to add these exclusions to their `lychee.toml` configs. Discovered while adopting flint in [opentelemetry-java-instrumentation#16270](open-telemetry/opentelemetry-java-instrumentation#16270). ## Test plan - [ ] CI link check passes (exercises the new test links in `tests/test-links.md`) - [ ] External repo line-number anchor test (`okhttp build.gradle#L144-L153`) passes - [ ] Issue comment anchor test passes Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
trask
reviewed
Feb 24, 2026
bf215dc to
d576f9d
Compare
zeitlinger
commented
Feb 24, 2026
69a898a to
9b88d0e
Compare
zeitlinger
commented
Feb 24, 2026
9b88d0e to
10b2c9d
Compare
c1c3005 to
496365f
Compare
496365f to
9b88d0e
Compare
Replace the three contrib-hosted link check scripts with flint's consolidated lint:links task. - mise.toml: replace 3 contrib-hosted task URLs with 1 flint URL (SHA-pinned to v0.7.0) - reusable-link-check.yml: simplify PR/push steps (flint handles mode detection) - renovate.json5: add inline custom manager to keep the SHA-pinned flint URL up to date - lychee.toml: remove workarounds for lychee#1729 (flint handles this), add line-number anchor exclude Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
9b88d0e to
ff7ef39
Compare
trask
approved these changes
Feb 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the three contrib-hosted link check scripts with flint's consolidated
lint:linkstask.Benefits:
refs/heads/main(mutable); flint pins to a commit SHA so builds are reproducible/blob/main/and/tree/main/URLs to the PR branch, preventing false failures when files are added or moved in a PRAUTOFIX=true mise run lintacross all lint tasksChanges:
mise.toml: replace 3 contrib-hosted task URLs with 1 flint URL (SHA-pinned to v0.7.0).github/workflows/reusable-link-check.yml: simplify PR/push steps (flint handles mode detection).github/renovate.json5: add inline custom manager to keep the SHA-pinned flint URL up to dateContext: I originally created the link check scripts in opentelemetry-java-contrib. Flint is a generalization of that work into a reusable toolbox — it's been adopted by several Grafana repos already.
Test plan
mise run lint:links --fullworks locally (exercises the push code path)