Skip to content

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

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

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.

@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 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.

@davideast

Copy link
Copy Markdown
Collaborator

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.

@davideast davideast closed this Jul 27, 2026
@davideast davideast mentioned this pull request Jul 27, 2026
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

3 participants