Skip to content

chore(lints): warn on all, deny correctness and suspicious, normalize allow priorities - #9

Merged
h4x0r merged 1 commit into
mainfrom
chore/workspace-lints-canonical
Aug 6, 2026
Merged

chore(lints): warn on all, deny correctness and suspicious, normalize allow priorities#9
h4x0r merged 1 commit into
mainfrom
chore/workspace-lints-canonical

Conversation

@h4x0r

@h4x0r h4x0r commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Part of the fleet-wide workspace.lints sweep: bring this repo's clippy
configuration up to the canonical recipe in CLAUDE.core.md.

What was verified before changing anything

The sweep's earlier rounds were twice wrong in the direction of comfort,
both times because a Cargo member with its own [lints] table replaces
workspace inheritance rather than extending it
— so a root-only check
scores a repo compliant while a member runs with no lints at all. Every
member's effective config was read here, not just the root.

The "zero production panic sites" claim was also re-derived rather than
taken on trust: .unwrap(), .expect(...), panic!, unreachable!,
todo! and slicing were scanned across every src/ tree, with each hit
traced to either a #[cfg(test)] module or a documented, feature-gated
test-only module.

Verification

cargo build, cargo test, cargo clippy --all-targets -- -D warnings
and cargo fmt --check all pass on the stricter config. No production
code changed — nothing lit up.

🤖 Generated with Claude Code

… allow priorities

This crate is a single package (no workspace members), so `[lints]`
here is the effective config with nothing to inherit and no member
table that could silently replace it.

Three gaps against the fleet recipe:

- the `all` group was absent entirely, so only `pedantic` was raised
  above clippy's defaults;
- `correctness` and `suspicious` sat at clippy's default `warn` rather
  than `deny`, so a member of either group would have passed a plain
  `cargo clippy`;
- `cast_precision_loss` was the one pragmatic cast allow missing.

The individual allows were also written bare, which leaves them at
priority 0 — safe while every group sat at -1, but it stops being safe
the moment a group is added at priority 0. Rewriting them as
`{ level = "allow", priority = 1 }` makes the ordering explicit instead
of incidental.

Nothing lit up: `cargo build`, `cargo test` (89 passed across 33
binaries), `cargo clippy --all-targets -- -D warnings` and
`cargo fmt --check` are clean on the stricter config, with no
production code changed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@h4x0r
h4x0r force-pushed the chore/workspace-lints-canonical branch from 56e0908 to 44575d4 Compare August 6, 2026 00:11
@h4x0r
h4x0r marked this pull request as ready for review August 6, 2026 00:43
@h4x0r
h4x0r merged commit f38d74d into main Aug 6, 2026
12 checks passed
@h4x0r
h4x0r deleted the chore/workspace-lints-canonical 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