Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

link-validation.ts misses several anchors and never fails CI

Aperta
#238 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenZeppelin/docs

Tutte le issue di OpenZeppelin/docs

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.