design.md icon indicating copy to clipboard operation
design.md copied to clipboard

feat: add `omitted` frontmatter key to suppress expected-missing lint warnings

Open mvanhorn opened this issue 5 months ago • 0 comments

Summary

Adds an omitted frontmatter key so an author can declare that a section (for example components or spacing) is intentionally absent. Declared omissions suppress the matching missing-sections warnings while leaving broken-ref and naming-convention rules untouched.

Why this matters

Today a clean design file with no components section produces the same warning as one that forgot it, so "intentionally omitted" and "linter didn't notice" look identical to a reviewer. The omitted key makes the intent explicit: a declared omission emits an info-level acknowledgement instead of a warning, and the rule still fires for sections that are absent without being declared. The maintainer called this "a good idea" in #78; the change is purely additive, so files without the key behave exactly as before.

Testing

Added tests across the parser, model, and the two missing-section rules covering declared omissions, undeclared absences, and that broken-ref is still reported. The existing suite passes.

Closes #78

mvanhorn avatar Jun 24 '26 07:06 mvanhorn