Repository navigation
feat(ignore): path-scoped ignore.rules entries - #706
Merged
Merged
Conversation
Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
ajianaz
added a commit
that referenced
this pull request
Oct 27, 2026
## What
`ignore.rules` entries can now be objects, backwards compatible with
plain strings:
```yaml
ignore:
rules:
- "Hardcoded password or secret" # whole project, unchanged
- rule: bug-println
files: ["crates/cli/**", "evals/**"] # only these paths
reason: "stdout is the cli interface" # optional, documentation
```
- `rule` is matched like a plain entry (rule id or title fragment);
`files` uses the `ignore.files` glob syntax.
- Applied in `review`, `scan` and the MCP tools, before the
`max_findings` cap.
- An empty `files` list (or an empty `rule`) is a config error instead
of a rule that applies nowhere.
- Docs (`configuration.md`, new section) and CHANGELOG updated.
## Why
A rule can be noise in one crate and a real design guard in another
(`bug-println` in a CLI vs an embedder-safe core); today the only
options are silencing it everywhere or excluding directories from every
check. Closes #680.
## Testing
- Unit tests: a scoped rule is silenced only under its globs, plain
strings still silence everywhere, `**/file.rs` globs.
- Config tests: YAML with strings and scoped objects (with `reason`)
loads; empty `files` fails validation.
- 2 end-to-end tests (tests/scoped_ignore.rs): silenced in `crates/cli`,
still fires in `crates/core`; plain form unchanged.
- fmt, clippy -D warnings and the full suite pass.
Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
Co-authored-by: ajianaz <ajianaz@users.noreply.github.com>
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.
What
ignore.rulesentries can now be objects, backwards compatible with plain strings:ruleis matched like a plain entry (rule id or title fragment);filesuses theignore.filesglob syntax.review,scanand the MCP tools, before themax_findingscap.fileslist (or an emptyrule) is a config error instead of a rule that applies nowhere.configuration.md, new section) and CHANGELOG updated.Why
A rule can be noise in one crate and a real design guard in another (
bug-printlnin a CLI vs an embedder-safe core); today the only options are silencing it everywhere or excluding directories from every check. Closes #680.Testing
**/file.rsglobs.reason) loads; emptyfilesfails validation.crates/cli, still fires incrates/core; plain form unchanged.