Skip to content

Z506: MALFORMED_FRONTMATTER

  • Severity: Error


    Penalty: 0.0 points | Category: general

  • Remediation & Opt-In


    Auto-Fixable: No | Opt-In: No


Rationale

This rule is triggered when the opening YAML frontmatter delimiter on line 1 of a file is malformed (such as using -- instead of ---), causing metadata directives to be parsed as raw body text.


How to Fix

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

  • Failing Pattern (Triggers Z506)


    docs/example.md
    <!-- BAD: Line 1 uses two dashes instead of three -->
    --
    title: "Invalid Frontmatter"
    ---
    
  • Passing Pattern (Resolves Z506)


    docs/example.md
    <!-- GOOD: Line 1 uses exactly three dashes -->
    ---
    title: "Valid Frontmatter"
    ---
    

Configuration

.zenzic.toml
# Evaluated on line 1 of Markdown files

Reference

See the Finding Codes Index for finding code details.