link-validation.ts misses several anchors and never fails CI
@stevep0z ci sta già lavorando.
Dal 4/9/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Problem
scripts/link-validation.ts runs on every PR (via lint.yml → pnpm run check) but doesn't actually catch broken links, for two reasons:
- It only recognizes anchors from real Markdown headings and literal
<a id="...">tags. Most anchors on API reference pages come from<APIItem id="...">, which it doesn't parse, so it can't tell if those are broken or fine. - It never sets a non-zero exit code, so even when it does find a broken link, the CI step still reports success. Confirmed live: the "Lint and Format Check" run on PR #233 merged commit passed despite 85 broken anchors in that commit.
On top of that, main has no branch protection (protected: false, no required status checks), so even a correctly-failing check wouldn't block a merge today.
Proposed fix, staged (not a single flip to hard-fail):
- Extend anchor detection to recognize
<APIItem id="...">(and similar components). Keep it non-blocking for now. - Let that surface the real, sitewide baseline of broken links (there are known pre-existing ones outside Cairo 4.x too), and clean those up or snapshot them.
- Only then add the non-zero exit code.
- Add branch protection on main requiring the lint job, once step 3 is trustworthy.
- Doing 3–4 before 1–2 would fail unrelated PRs on pre-existing debt they didn't introduce; hence the order.
- Lingua principale
- MDX
- Stelle
- 6
- Fork
- 23
- Merge medio
- 39m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenZeppelin/docs
-
Difficoltà 2/5 1-2 giorni Idoneità per principianti 68/100
OpenZeppelin/docs#242 ·
-
Tutorial issues: wrong default EntryPoint address and incorrect viem destructuringForse già presa @vridhib l’ha presa 187 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
OpenZeppelin/docs#134 · 1 commento ·
-
documentation
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
OpenZeppelin/docs#236 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
OpenZeppelin/docs#231 ·
-
Dead link to ethgasstation.info in Defender Relayers docsForse già presa @Flotapponnier l’ha presa 98 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
OpenZeppelin/docs#199 ·