Skip to content

feat(core): configurable --ignore screen-name globs - #5

Merged
oxxo merged 2 commits into
masterfrom
feat/scan-ignore-patterns
Jun 2, 2026
Merged

feat(core): configurable --ignore screen-name globs#5
oxxo merged 2 commits into
masterfrom
feat/scan-ignore-patterns

Conversation

@oxxo

@oxxo oxxo commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

Implements ignorePatterns (was declared in AnalyzerOptions but never wired): user-supplied screen-name globs that exclude matching screens from the entire scan — issues, science metrics, and the 0-100 score. Resolves the dogfood finding that variant/WIP frames (— Dev, — Demo, [FIX]) were being scored as real screens — without hardcoding a skip list (the founder chose the configurable route, zero risk of excluding real screens).

How it works

  • filters.ts: globToRegExp (only * is a wildcard; everything else literal, case-insensitive, full-match) + matchesIgnore.
  • scanner.ts: filters metrics (before scoring/dual-emit) and issues (before summary) by the patterns — so a pattern removes the screen from every check, not just one.
  • CLI: --ignore "* — Dev,* — Demo,[FIX]*"; MCP: ignore: string[].

Verification

Real EDET run: without ignore, 16 — Dev/— Demo screens were flagged; with --ignore "* — Dev,* — Demo"0, real screens untouched, score stable. 90 tests (+2: end-to-end ignore + glob unit), tsc --noEmit strict clean across core/cli/mcp.

Note

Not republished to npm yet — this is a backward-compatible additive feature (would be a 0.2.1/0.3.0 release when you decide to publish).

🤖 Generated with Claude Code

oxxo and others added 2 commits June 2, 2026 13:35
…/WIP frames)

Wire up the previously-declared-but-unused AnalyzerOptions.ignorePatterns:
user-supplied screen-name globs that exclude matching screens from the ENTIRE
scan — issues, metrics, and the score. Applied in scanner.ts after collection,
so a pattern like "* — Dev" removes that screen from every check (orphan,
contrast, emphasis, ...), not just one. No hardcoded Dev/Demo/[FIX] list — the
user decides per file.

- filters.ts: globToRegExp (only * is a wildcard; everything else literal,
  case-insensitive, full-match) + matchesIgnore.
- CLI: --ignore "<comma,separated,globs>"; MCP: ignore: string[].

Verified on EDET: --ignore "* — Dev,* — Demo" drops 16 variant screens to 0,
real screens untouched. 90 tests (+2), tsc strict clean across core/cli/mcp.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… test, docs)

Addresses the adversarial audit of PR #5:
- filters.ts: matchesIgnore returns false for empty names, so screen-name globs
  (even "*") never suppress file-level diagnostics (metadata findings).
- mcp: filter(Boolean) on the ignore array (drop empty strings, CLI parity).
- scanner.test.ts: cover ignore filtering of additionalIssues/additionalMetrics
  (simulator/vision path) + the empty-name guard (the audit's only HIGH: a
  test-coverage gap — the filtering code was already correct).
- README: document --ignore + the science flags (--metrics/--score/--ergonomics)
  that were missing from the Options section.

91 tests passing, tsc --noEmit strict clean across core/cli/mcp.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@oxxo
oxxo merged commit b68c144 into master Jun 2, 2026
1 check failed
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