CI: Deduplicate links in the Check Links report - #9140
Conversation
lychee lists the same broken link once per file that references it, so a link cited from many docs pages shows up many times in the weekly report/issue. Add a post-processing step that keeps only the first occurrence of each link and drops now-empty per-file sections. Assisted-by: Claude Sonnet 5 (High effort)
|
It's easy to write a ~100-line script with Claude to process the output, but I feel it's too complex for us to maintain. Looking at the latest report in #9139, maybe we should ignore timeout errors and 403 errors? I think we care about 404 errors the most. |
|
I could simplify this to a short bash pipeline instead: The trade-off is that the report becomes a flat, deduplicated list instead of being grouped per source file, so it wouldn't say which file(s) each broken link came from anymore. Would that be better for you? |
The Python script has the same drawback because it reports only the first occurrence of a broken link. I usually use |
The same broken link often gets listed once per file that references
it, so a single dead link can flood the weekly "Link Checker Report"
issue with repeated entries.
Added a post-processing step that keeps only the first occurrence of
each link in the report and drops the per-file subsections that end
up empty after deduplication.
Assisted-by: Claude Sonnet 5 (High effort)