Skip to content

Z302: DEAD_DEF

  • Severity: Error


    Penalty: 0.0 points | Category: general

  • Remediation & Opt-In


    Auto-Fixable: No | Opt-In: No


Rationale

This rule is emitted when a reference link definition [ref-id]: URL is declared in a Markdown document but is never consumed by any reference link in that file. Unused link definitions clutter source files.


How to Fix

Inspect the flagged location in the Markdown file and update the content or configuration:

  • Failing Pattern (Triggers Z302)


    docs/example.md
    <!-- BAD: Definition declared at bottom but never referenced in prose -->
    [unused-link]: https://example.com/api
    
  • Passing Pattern (Resolves Z302)


    docs/example.md
    <!-- GOOD: Reference the link definition in prose, or delete the line -->
    Check the [API Docs][unused-link].
    
    [unused-link]: https://example.com/api
    

Configuration

.zenzic.toml
# Evaluated during reference auditing pass

Reference

See the Finding Codes Index for finding code details.