You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(ignore): path-scoped ignore.rules (silence a rule in some directories only) #680
ignore.rules applies to the whole project and ignore.files removes a file from every check. There is no way to say "rule X is noise under crates/cli/** but must stay on in crates/core/**". Today the only options are: silence the rule everywhere, exclude the directory from all checks, or sprinkle inline markers.
Real case
A Rust workspace with a CLI crate and an embedder-safe core crate. bug-println is noise in the CLI (stdout is its interface; 64 hits) but guards a real design rule in the core ("never write to stdout"). With only global switches the choice was: keep 64 false positives, or silence the rule everywhere and re-implement the core-only half as a rules_engine.custom rule with an exclude list (which works, but is a workaround and duplicates what the built-in rule already knows).
Proposal
Allow ignore.rules entries to be objects, backwards compatible with plain strings:
ignore:
rules:
- "Hardcoded password or secret"# unchanged: whole project
- rule: bug-printlnfiles: ["crates/cli/**", "evals/**"] # only these paths
- rule: bug-expectfiles: ["**/subprocess.rs"]reason: "expects state a local invariant"# shown in reports, optional
files uses the same glob syntax as ignore.files.
Optional reason surfaces in JSON/SARIF suppression metadata (pairs well with a reason separator for inline markers).
Works in review, scan and the MCP tools, applied before the max_findings cap like today.
Activity
feat(ignore): path-scoped ignore.rules entries (#706)