Skip to content

feat(linter): add \omitted\ key to suppress missing-section warnings#147

Open
sudarshandev-llm wants to merge 2 commits into
google-labs-code:mainfrom
sudarshandev-llm:main
Open

feat(linter): add \omitted\ key to suppress missing-section warnings#147
sudarshandev-llm wants to merge 2 commits into
google-labs-code:mainfrom
sudarshandev-llm:main

Conversation

@sudarshandev-llm

Copy link
Copy Markdown

Implements the \omitted\ key proposal from #78.

Summary

Adds an optional \omitted\ top-level YAML key that lets authors declare sections as intentionally absent. The linter suppresses \missing-sections\ and \missing-typography\ warnings for declared omissions and emits acknowledgment findings instead.

Changes

  • Parser: \ParsedDesignSystem\ now includes \omitted?: OmittedEntry[]\ (supports both bare string and {section, reason?}\ forms)
  • Model: \DesignSystemState\ threads \omitted\ through to lint rules
  • Modified rules: \missing-sections\ and \missing-typography\ check \omitted\ before emitting warnings
  • New rules: \declared-omission\ (info),
    edundant-omission\ (warning), \unknown-omission\ (warning)
  • Tests: 17 new test cases across 5 test files; all 299 tests pass

@google-cla

google-cla Bot commented Jun 28, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

serializeTailwindV4() already appends a trailing newline to the
@theme block. Using console.log() adds a second trailing newline,
making checked-in generated CSS fail strict whitespace gates like
git diff --check.

Fixes google-labs-code#139

Change-Id: I3a0150b2c0f8e6a7b9d4c3e2f1a0b9c8d7e6f5a4
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.

1 participant