Skip to content

lints: complete the canonical lints block - #2

Merged
h4x0r merged 1 commit into
mainfrom
lints/canonical-lints
Aug 5, 2026
Merged

lints: complete the canonical lints block#2
h4x0r merged 1 commit into
mainfrom
lints/canonical-lints

Conversation

@h4x0r

@h4x0r h4x0r commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

lints: complete the canonical lints block

lzo carried a partial block: unsafe_code = "forbid" and pedantic, but no
unwrap_used/expect_used, no correctness/suspicious, and none of the
canonical cast_* allows. The panic lints are the gap that matters - this
crate decodes attacker-controllable compressed streams, so ADR-0012's
untrusted-input superset applies.

Added: all, correctness = "deny", suspicious = "deny", unwrap_used =
"deny", expect_used = "deny", and the canonical cast_*/module_name/
must_use/missing_panics allows.

The two pre-existing allows (verbose_bit_mask, missing_errors_doc) are
kept with their original rationale comments, but rewritten from bare
= "allow" to { level = "allow", priority = 1 }. That is required, not
cosmetic: clippy's lint_groups_priority rejects a manifest where a lint
group set to "deny" shares priority 0 with an individual lint, so the
bare form fails the build once correctness/suspicious are denied.

Zero findings in production code. The unwraps that surfaced are all in
tests/, which now carry the sanctioned top-level allow.

Gate: cargo build --all-targets, cargo test, cargo clippy --all-targets
-- -D warnings, cargo fmt --check - all clean.

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

🤖 Generated with Claude Code

lzo carried a partial block: unsafe_code = "forbid" and pedantic, but no
unwrap_used/expect_used, no correctness/suspicious, and none of the
canonical cast_* allows. The panic lints are the gap that matters - this
crate decodes attacker-controllable compressed streams, so ADR-0012's
untrusted-input superset applies.

Added: all, correctness = "deny", suspicious = "deny", unwrap_used =
"deny", expect_used = "deny", and the canonical cast_*/module_name/
must_use/missing_panics allows.

The two pre-existing allows (verbose_bit_mask, missing_errors_doc) are
kept with their original rationale comments, but rewritten from bare
`= "allow"` to `{ level = "allow", priority = 1 }`. That is required, not
cosmetic: clippy's lint_groups_priority rejects a manifest where a lint
group set to "deny" shares priority 0 with an individual lint, so the
bare form fails the build once correctness/suspicious are denied.

Zero findings in production code. The unwraps that surfaced are all in
tests/, which now carry the sanctioned top-level allow.

Gate: cargo build --all-targets, cargo test, cargo clippy --all-targets
-- -D warnings, cargo fmt --check - all clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@h4x0r
h4x0r marked this pull request as ready for review August 5, 2026 20:27
@h4x0r
h4x0r merged commit ad4a514 into main Aug 5, 2026
12 checks passed
@h4x0r
h4x0r deleted the lints/canonical-lints branch August 9, 2026 15:28
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.

1 participant