#8: scope.exclude config knob for discoverFiles#31
Merged
Conversation
verbatim. Pure relocation, no behaviour change; runner.ts was at the 200-line limit, and discovery is a distinct responsibility. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nq6xHU6JtSNpYWhMYjXB15
Union an optional scope.exclude glob array onto the built-in ignore set so consumers can keep fixture/sample subtrees out of discovery. Default behaviour is unchanged when unset. This repo excludes tests/fixtures/** so a self-run stops tripping eslint:fatal on the fixture subtree. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Nq6xHU6JtSNpYWhMYjXB15
devill
force-pushed
the
issue-8-scope-exclude
branch
from
June 17, 2026 14:48
2b52bb8 to
03da486
Compare
devill
marked this pull request as ready for review
June 17, 2026 14:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8.
discoverFilesused a hardcoded ignore set (node_modules,dist,coverage) and swepttests/fixtures/**, so a self-run tripped 26eslint:fatalviolations on the fixture subtree (which has its own tsconfig).Fix (locked decision — option b)
Add an explicit
scope.exclude: string[]config knob, unioned onto the built-in ignore set indiscoverFiles. Not.gitignore-based. Default behaviour unchanged when unset. The repo's own config now setsscope.exclude: ['tests/fixtures/**'], andnode dist/cli.js --allreports 0 fixture violations.Atomic commits
#8: extract file discovery into its own module— pure move ofFILE_GLOBS+discoverFilesfromrunner.ts(which was at themax-lines: 200limit) intosrc/discover.ts. No behaviour change.#8: add scope.exclude knob honored by discoverFiles— schema field + validation +excludeparam unioned onto the ignore set + wiring + repo config + a test pinning both the exclude and the unchanged default.#8: record file-discovery extraction in DECISIONS.mdGates
pnpm build,pnpm lint— clean (runner.ts back under 200 lines)pnpm test— 387 passed (+2 new)node dist/cli.js --all— 0tests/fixturesviolations🤖 Generated with Claude Code
Generated by Claude Code