feat: add omitted frontmatter key to suppress expected-missing lint warnings - #113
Conversation
rajpratham1
left a comment
There was a problem hiding this comment.
This is a well-designed feature that adds support for an omitted frontmatter key to explicitly suppress expected "missing section" lint warnings. The implementation is consistent across the parser, model, and linting layers, and it's backed by thorough test coverage covering parsing, case-insensitive matching, filtering invalid values, and rule behavior.
rajpratham1
left a comment
There was a problem hiding this comment.
This is a thoughtful enhancement that gives authors an explicit way to suppress expected "missing section" warnings without weakening the default linting behavior. The feature is implemented consistently across the parser, model, and lint rules, and includes good regression coverage.
|
Hey, @mvanhorn. Thank you for originally proposing this feature and driving #78 forward. A bunch of overlapping PRs for this issue were raised, each with different approaches. We decided to consolidate this work and merge PR #155 because it unites all omission validation checks into a single rule module and updates the built specification documentation and README. However, we don't want your work and time to go unappreciated. We included you in the squash merge commit for #155 with a git Co-authored-by trailer. Thank you again for your time with this project. |
Summary
Adds an
omittedfrontmatter key so an author can declare that a section (for examplecomponentsorspacing) is intentionally absent. Declared omissions suppress the matchingmissing-sectionswarnings while leavingbroken-refand naming-convention rules untouched.Why this matters
Today a clean design file with no
componentssection produces the same warning as one that forgot it, so "intentionally omitted" and "linter didn't notice" look identical to a reviewer. Theomittedkey makes the intent explicit: a declared omission emits aninfo-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-refis still reported. The existing suite passes.Closes #78