Passa al contenuto principale

Z107-circular-anchor — Anchor Auto-Referenziale

Z-Code: Z107 CIRCULAR_ANCHOR · Engine: standalone · Exit: 0

zenzic check all
standalone - 1 file (1 docs, 0 assets) - 0.0s - 64 files/s
docs/guide.md:14:51
[Z107]Self-referential anchor link: '[Setup](#setup)' slugifies to its own fragment. Replace with a meaningful target or remove the link.
12│ For advanced options, consult the reference documentation linked bel…
13
14This page contains a self-referential anchor link: [Setup](#setup)
│                                                   ^^^^^^^^^^^^^^^
15
16│ ## Next Steps
────────────────────────────────────────────────────────────────────────────────
Summary:✘ 0 errors⚠ 1 warningℹ 0 info- 1 file with findings
✨ Analysis complete: All statically-detectable links, credentials, and references verified.
Refer to https://zenzic.dev/docs/reference/finding-codes for remediation · Try
'zenzic check --help' for options.
🔒 Suppression Audit: 0/30 (inline: 0, per-file: 0)
exit 0

Il Fixture

Il fixture si trova in examples/z107-circular-anchor/ nel repository Zenzic. Il documento sorgente è docs/guide.md, che contiene il link [Setup](#setup) all'interno della sezione con intestazione ## Setup.

Il testo del link "Setup" si trasforma nello slug #setup, identico al frammento dell'intestazione ## Setup che lo contiene — rendendolo circolare (cliccarlo riporta nello stesso punto che l'utente sta già leggendo):

RigaLinkFrammentoAuto-referenziale?
14[Setup](#setup)#setup (== intestazione padre)
examples/z107-circular-anchor/.zenzic.toml
docs_dir = "docs"
fail_under = 0

[build_context]
engine = "standalone"

Eseguire l'Esempio

# Clona il repository Zenzic — nessuna installazione richiesta
cd examples/z107-circular-anchor
uvx zenzic check all

Output atteso:

standalone · 1 file (1 docs, 0 assets) · 0.0s · 64 files/s

docs/guide.md:14:51 ! [Z107] Self-referential anchor link: '[Setup](#setup)'
slugifies to its own fragment. Replace with a meaningful target or remove the
link.

12 │ For advanced options, consult the reference documentation linked bel…
13 │
14 ❱ This page contains a self-referential anchor link: [Setup](#setup)
│ ^^^^^^^^^^^^^^^
15 │
16 │ ## Next Steps

────────────────────────────────────────────────────────────────────────────────

Summary: x 0 errors ! 1 warning i 0 info · 1 file with findings

Analysis complete: All statically-detectable links, credentials, and references
verified.

Exit code: 0

Interpretare l'Output

Il finding Z107 indica un problema CIRCULAR_ANCHOR.

Questo avviso viene sollevato quando il testo di un link — dopo l'applicazione dello stesso algoritmo di slug che il motore usa per gli ID delle intestazioni — risolve lo stesso frammento della destinazione del link. Cause comuni:

  • Copiare un titolo come testo del link senza cambiare l'#anchor
  • Link "Torna su" autogenerati che puntano alla sezione corrente
  • Voci del sommario in cui il testo del link rispecchia esattamente l'intestazione

Metadati:

  • Tipo di scansione: Rule Engine (built-in, sempre attivo)
  • Severità: Warning
  • Impatto: Deduce 1.0 punto DQS (categoria strutturale, peso 0.30).

Risolvere il Problema

Sostituire il link circolare con una destinazione significativa o rimuoverlo:

- This page contains a self-referential anchor link: [Setup](#setup)
+ To jump to the next section, see [Next Steps](#next-steps).

Vedi Anche