Skip to content

Z406: NAV_CONTRACT

Severity: warning Penalty: 2.0 points Category: brand Auto-fixable: No

Rationale

This rule is emitted when the structure of mkdocs.yml navigation violates structural contract requirements, such as referencing non-existent target files or using invalid dictionary nesting.

How to Fix

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

Bad (Triggers Z406)

# mkdocs.yml - BAD: Referencing non-existent markdown source file
nav:
  - Tutorial: tutorials/non-existent.md

Good (Resolves Z406)

# mkdocs.yml - GOOD: Referencing valid existing source file
nav:
  - Tutorial: tutorials/first-audit.md

Configuration

# Governed by nav: section in mkdocs.yml

Reference

See the Finding Codes Index for finding code details.