Skip to content

chore(lints): deny correctness/suspicious and enable clippy::all - #9

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

chore(lints): deny correctness/suspicious and enable clippy::all#9
h4x0r merged 1 commit into
mainfrom
lints/workspace-lints-sweep

Conversation

@h4x0r

@h4x0r h4x0r commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What

Completes [workspace.lints.clippy] to the fleet-canonical set (CLAUDE.core.md → "Rust Lint Posture"):

  • adds all = { level = "warn", priority = -1 }
  • adds correctness = { level = "deny", priority = -1 }
  • adds suspicious = { level = "deny", priority = -1 }
  • converts the individual allows from bare "allow" to { level = "allow", priority = 1 }

Why

The repo already denied unwrap_used/expect_used, but everything else ran at pedantic warn only — so a genuine correctness finding would have rendered as a warning at most. This is part of a fleet-wide sweep; the same shaped gap in sibling repos concealed a release-mode i64 overflow, a public-API panic, and a 16 GiB unbounded allocation from an untrusted length field.

The priority change is load-bearing, not cosmetic: clippy's lint_groups_priority rejects a manifest where a denied group shares priority 0 with an individual lint, and priority 1 is what makes the allows actually outrank the grouped entries.

Verification

Config-only change — zero sites lit up. Verified after touching the crate roots so this is a real recompile, not a cache hit:

$ cargo clippy --all-targets --workspace -- -D warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s)
$ cargo fmt --check        # clean
$ cargo test --workspace   # 0 failed

Scope note

Effective per-member configuration was checked, not just the root — every member inherits via [lints] workspace = true with no member-local [lints.clippy] table that would silently replace inheritance.

🤖 Generated with Claude Code

The workspace denied the panic pair (`unwrap_used`/`expect_used`) but ran the
rest of clippy at `pedantic` warn only — the `all` group and the two
defect-class denies (`correctness`, `suspicious`) were absent, so a genuine
correctness lint would have rendered as a warning at most. This brings the
manifest to the fleet-canonical set (CLAUDE.core.md, "Rust Lint Posture").

The individual allows move from bare `"allow"` to `{ level = "allow",
priority = 1 }`. That is required, not cosmetic: clippy's
`lint_groups_priority` rejects a manifest where a denied group shares
priority 0 with an individual lint, and priority 1 is also what makes the
allows actually outrank the grouped entries.

Zero new diagnostics: `cargo clippy --all-targets --workspace -- -D warnings`
is clean after a forced rebuild, and the test suite passes unchanged.

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 e70b9d7 into main Aug 5, 2026
16 checks passed
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