feat: add `omitted` frontmatter key to suppress expected-missing lint warnings by mvanhorn · Pull Request #113 · google-labs-code/design.md · GitHub
Skip to content

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

Open
mvanhorn wants to merge 1 commit into
google-labs-code:mainfrom
mvanhorn:fix/78-omitted-key-suppress-missing-warnings
Open

feat: add omitted frontmatter key to suppress expected-missing lint warnings#113
mvanhorn wants to merge 1 commit into
google-labs-code:mainfrom
mvanhorn:fix/78-omitted-key-suppress-missing-warnings

Conversation

@mvanhorn

Copy link
Copy Markdown
Contributor

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

@rajpratham1 rajpratham1 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: omitted key to declare intentional absence and suppress expected-missing warnings

2 participants