Skip to content

warning-suppression: skip vendored/generated files - #188

Merged
missingbulb merged 1 commit into
mainfrom
claude/warning-suppression-skip-vendored
Jul 8, 2026
Merged

warning-suppression: skip vendored/generated files#188
missingbulb merged 1 commit into
mainfrom
claude/warning-suppression-skip-vendored

Conversation

@missingbulb

Copy link
Copy Markdown
Owner

What

warning-suppression no longer fires on vendored/generated files — content git marks linguist-vendored or linguist-generated.

Closes #187

Why

#183 correctly made the check whole-file ("check-the-world"), but that means it scans third-party and machine-written content too. A consumer that records event pages as linguist-vendored HTML fixtures gets 24+ blocking findings from those pages' own inline eslint-disable/@ts-ignore markers — none of which are suppression decisions the project made. The only workaround was a per-repo accept entry, which every consumer with recorded fixtures or generated files would need.

A marker inside vendored/generated content isn't the project's code, so it's out of scope — the same reasoning as the existing .md / packs/ / checks/test/ skips.

How

  • New ctx.vendored() in checks/lib/context.mjs: a lazily-computed Set of the in-scope files git marks linguist-vendored/linguist-generated, via git check-attr --stdin linguist-vendored linguist-generated — so .gitattributes patterns and precedence are honored natively (no hand-rolled glob matcher), with paths fed on stdin so a large repo can't overflow argv. (sh gained an input option.)
  • warning-suppression skips vendored.has(file).
  • Red-first test: markers in a linguist-vendored fixture and a linguist-generated file are ignored, while the project's own src/mine.js still fires.

Verification

  • Full suite 83/83; Claudinite's own conformance clean.
  • Ran the fixed check against the real consumer (GoogleCalendarEventCreator): the vendored HTML fixtures drop from 24+ findings to 0, and only the project's own test (a deliberate eval) remains — correctly still needing its own accept. ctx.vendored() identified all 34 fixtures.

🤖 Generated with Claude Code

https://claude.ai/code/session_019iJfy6YPtnTvvRGPsUYvYY


Generated by Claude Code

Since #183 made the check whole-file, it flags markers inside vendored/generated
content — a recorded third-party fixture (linguist-vendored) or a machine-written
file (linguist-generated) whose markers aren't the project's suppression
decisions. A consumer with cached third-party pages gets dozens of false blocking
findings with no recourse but a per-repo accept entry.

Skip files git marks linguist-vendored / linguist-generated, the same way the
check already skips docs, packs/, and checks/test/. Add a lazy ctx.vendored()
helper backed by `git check-attr --stdin` (so .gitattributes patterns/precedence
are honored natively; paths on stdin so a large repo can't overflow argv), and
consume it in the check. Red-first test: markers in a vendored fixture and a
generated file are ignored while the project's own file still fires.

Refs #187

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019iJfy6YPtnTvvRGPsUYvYY
@missingbulb
missingbulb merged commit a3a3be2 into main Jul 8, 2026
1 check passed
@missingbulb
missingbulb deleted the claude/warning-suppression-skip-vendored branch July 8, 2026 18:22
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.

warning-suppression flags vendored/generated third-party content

2 participants