Repository navigation
fix(rules): max_findings defaults to 50 and never hides critical/major findings - #660
Merged
Merged
Conversation
…r findings The default cap of 5 hid serious findings (a module with 7 critical findings showed 5). The cap now limits only Minor/Info noise: it keeps every Critical and Major finding and fills the remaining slots with the most severe noise, still reporting how many were not shown. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
ajianaz
force-pushed
the
fix/max-findings-never-hide-serious
branch
from
October 15, 2026 07:25
867a3c7 to
2dc754b
Compare
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
rules_engine.max_findingsdefault 5 → 50.not_shown/ the stderr warning still report what was cut.max_findings: 0/nullremains "no cap". Profiles keep their own values and get the same exemption.Why
Measured on a real Rust codebase (uteke) with the cap off:
uteke-clihas 915 deterministic findings of which 7 are Critical, so the old default showed 5 and hid 2 of the serious ones;uteke-corehas 2404 (10 Critical, 88%bug-unwrap), so unlimited is not a usable default either. A capped list also reads as the full picture to users and agents (found while testing agent mode).Testing
cargo fmt --check,cargo clippy --all-targets --features tree-sitter -- -D warnings,cargo test --features tree-sitter(1215 passed). Existing cap tests that capped critical secrets were rewritten for the new rule; new tests: serious findings exempt, remaining slots go to the most severe noise (Minor before Info), default 50.uteke-clishows 50 (7 critical + 43 minor, 865 not shown),uteke-coreshows 50 (10 critical + 40 minor, 2354 not shown).