Skip to content

Fail the check only from a chosen severity - #78

Merged
SizzleUnrlsd merged 2 commits into
mainfrom
feat/fail-on
Sep 5, 2026
Merged

SizzleUnrlsd merged 2 commits into
mainfrom
feat/fail-on

Conversation

@SizzleUnrlsd

Copy link
Copy Markdown
Contributor

Summary

Last item of #68: the exit status can follow a severity threshold.

  • Acceptance tests first (test: define the severity threshold), implementation follows.
  • Severity.rank orders the severities, info lowest, critical highest.
  • --fail-on SEVERITY with --check: every finding is still reported, the exit status is 1 only when a finding of that severity or above was reported. Without it any finding fails the check, as before. Suppressed and baselined findings never count. An unknown severity is rejected by the parser; the option without --check is a usage error.
  • Usage guide: option row, exit status paragraph and the CI example now gating on high.

With relative paths (#75), inline suppressions (#76), the baseline (#77) and this threshold, a repository with known findings can run the analyzer in CI and fail only on new findings at the chosen severity, with SARIF alerts attached to files.

Closes #68

@SizzleUnrlsd SizzleUnrlsd self-assigned this Sep 5, 2026
@SizzleUnrlsd
SizzleUnrlsd merged commit 98569d8 into main Sep 5, 2026
10 checks passed
@SizzleUnrlsd
SizzleUnrlsd deleted the feat/fail-on branch September 5, 2026 10:26
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.

Adoption in an existing repository: relative paths, suppressions, baseline, severity threshold

1 participant