Severity overrides

Raise, downgrade or turn off a rule's diagnostics per directive — warn=, error=, off= — without deleting the rule.

Computer, authorize manual override, Picard four-seven-alpha-tango. Sometimes the standing orders are right for the ship but wrong for this deck, this shift. You don't rip out the safety system — you log an authorized override and move on.

The target is a rule name or diagnostic code, comma-separated; a target that names nothing is the contract error unknown-override-target (a typo would otherwise change nothing silently), so the check could not run. Lint findings (markdownlint, unclosed-fence, unclosed-comment, fenced-output, frontmatter-unreadable) are not a contract's to change: they are always errors, and an override naming one (or a contract or input code) is the contract error unlevelable-override, so the check could not run. Examples check this document:

## Summary

TBD

Downgrade to a warning — warn=

Reported, exit 0.

<!-- mdv: section required content.none=@placeholders warn=placeholder-text -->
## Summary

Upgrade to an error — error=

<!-- mdv: section required content.words.min=20 error=too-few-words -->
## Summary

too-few-words warns by default; now it blocks.

Turn it off — off=

<!-- mdv: section required content.none=@placeholders off=placeholder-text -->
## Summary

For a set of documents, or for the whole repo

A document never changes its own contract's severities. Repo-wide, or for the paths an overrides entry matches, set them in mediva.config.mjs. Config has the final say on a level: its setting wins over the contract's warn=, error= and off=<code>. Only off= naming a rule stays final, because whether a rule runs is the contract's to say.

rules: { "too-few-words": "warn" },
overrides: [{ files: ["docs/adr/**"], rules: { "too-few-words": "off" } }],

See What blocks.

When to reach for an override

warn= while adopting, error= once settled (Strictness), off= or a config overrides entry for exceptions. Don't delete the rule.

On this page