Skip to content

feat(code-quality): add --exclude flag to /code-quality:size - #32

Open
bfirestone wants to merge 1 commit into
mainfrom
feat/size-review-exclude-flag
Open

feat(code-quality): add --exclude flag to /code-quality:size#32
bfirestone wants to merge 1 commit into
mainfrom
feat/size-review-exclude-flag

Conversation

@bfirestone

Copy link
Copy Markdown
Contributor

Summary

Adds a CLI-supplied --exclude <pattern> flag to /code-quality:size so users can pass ad-hoc exclusion globs at invocation time without editing tracked repo config. Useful for one-off local reviews where a vendored or generated directory should be ignored just this once.

The flag augments (does not replace) the three existing exclusion sources, becoming a fourth source in the union:

  1. Bundled universal defaults (references/default-exclusions.md)
  2. Repo-local .code-quality/size-review-exclude
  3. .gitattributes linguist-generated=true
  4. NEW: invocation-supplied --exclude <pattern> (one or more)

Changes

  • commands/size.md — document the new /code-quality:size <scope> --exclude <pattern> invocation form and the quoting rule for patterns containing spaces.
  • skills/size-review/SKILL.md — add invocation-supplied patterns as the fourth source in the exclusion-build step; updated the section header from "up to three sources" to "these sources".

No behavior change for invocations that don't pass --exclude. Backward compatible with existing repos.

Test plan

  • /code-quality:size on a branch without --exclude behaves identically to before (the new source is empty).
  • /code-quality:size #<PR> --exclude "vendor/**" removes vendor/** from the threshold check and seam analysis on top of bundled + repo-local + .gitattributes exclusions.
  • A pattern with spaces (e.g. --exclude "generated stubs/**") is parsed as a single argument when quoted.
  • Excluded files are still reported separately in the output (transparency rule unchanged).

Let users pass ad-hoc exclusion globs at invocation time without
editing repo config. The flag augments (does not replace) the three
existing exclusion sources: bundled universal defaults, repo-local
.code-quality/size-review-exclude, and .gitattributes
linguist-generated=true.

- commands/size.md: document the new
  `/code-quality:size <scope> --exclude <pattern>` invocation form
- skills/size-review/SKILL.md: add invocation-supplied patterns as a
  fourth exclusion source in the union

Useful for one-off local reviews where you want to ignore a vendored
or generated directory without modifying tracked config.
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