Skip to content

Add validate --allow CODE to leave a code out of pass/fail - #48

Merged
imnasnainaec merged 4 commits into
mainfrom
validate-allow
Oct 8, 2026
Merged

imnasnainaec merged 4 commits into
mainfrom
validate-allow

Conversation

@imnasnainaec

@imnasnainaec imnasnainaec commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #2.

🤖 Generated with Claude Code


This change is Reviewable

validate --allow CODE (repeatable) reports a code's findings but excludes them
from the error and warning counts, so they neither fail the run nor trip
--strict. It applies to error-level codes as well as warnings. The text summary
line tallies allowed findings per code, and the JSON summary gains an allowed
total. A code that never occurs is ignored.

The GitHub Action gains an allow input taking codes separated by commas,
spaces, or newlines.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@imnasnainaec imnasnainaec self-assigned this Sep 24, 2026
@imnasnainaec imnasnainaec added enhancement New feature or request 🟨Medium Medium-priority PR labels Sep 24, 2026
A value with CRLF line breaks left a trailing \r on each code, so no code
matched a finding and nothing was allowed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
jasonleenaylor
jasonleenaylor previously approved these changes Oct 2, 2026

@jasonleenaylor jasonleenaylor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question and one nit inline. LGTM.

This review was assisted by Claude Fable 5.1.

Comment thread src/sil_lift/_cli.py Outdated
Comment thread docs/en/guides/cli.md Outdated
`--allow a,b` previously matched no code and was silently ignored,
unlike the Action's allow input, which already takes a list. Split
each value on commas so both forms work. Also reword the exit-code
note so "warnings allowed" is not read as referring to --allow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`--allow "schema, form-missing-lang"` kept the leading space on the
second code, so it matched nothing and its findings still failed the
run. Strip each comma-separated piece, matching the Action's allow
input, which already splits on whitespace as well as commas.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@imnasnainaec
imnasnainaec merged commit 0052532 into main Oct 8, 2026
12 of 13 checks passed
@imnasnainaec
imnasnainaec deleted the validate-allow branch October 8, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request 🟨Medium Medium-priority PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --allow CODE to exclude specific problem codes from validate's pass/fail decision

2 participants