Skip to content

refactor(lints): adopt #[expect] and fix crypto/frost lint inheritance - #675

Open
varex83agent wants to merge 1 commit into
mainfrom
fix/issue-609-expect-lints
Open

refactor(lints): adopt #[expect] and fix crypto/frost lint inheritance#675
varex83agent wants to merge 1 commit into
mainfrom
fix/issue-609-expect-lints

Conversation

@varex83agent

Copy link
Copy Markdown
Collaborator

Closes #609.

Converted ~76 justified #[allow]/#![allow] suppressions in hand-written code to #[expect(..., reason = "...")] (0 -> 84 #[expect] attrs; non-generated bare #[allow] count dropped from ~92 to 16, each now carrying a reason). Removed several stale suppressions whose wiring has landed (e.g. dead_code on tracker/inclusion.rs, tracker/reason.rs, validatorapi fields, dkg signing, and a now-transformed too_many_arguments on BeaconMock::new). Cases where #[expect] would be unfulfilled on some target (e.g. async_fn_in_trait, test/example missing_docs, deprecated, test-only dead_code) are kept as #[allow] with an explanatory reason comment. Generated code (proto includes, build-proto, eth2api bindings) and tbls::math's unsafe_code opt-in were left untouched.

Fixed the crypto/frost [lints] inheritance drift: both re-listed the clippy set by hand and missed the workspace-denied redundant_test_prefix. Cargo does not allow [lints] workspace = true combined with a per-lint override, and both crates must relax unsafe_code for the blst C bindings, so the lint set is now listed explicitly, completed with redundant_test_prefix, and documented as needing to stay in sync with [workspace.lints].

Gates: cargo +nightly fmt --all --check, cargo clippy --workspace --all-targets --all-features -- -D warnings, and cargo test --workspace --all-features all pass.

Co-Authored-By: Bohdan Ohorodnii 35969035+varex83@users.noreply.github.com

Closes #609.

Co-Authored-By: Bohdan Ohorodnii <35969035+varex83@users.noreply.github.com>
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.

Reduce #[allow] annotations; adopt #[expect]; fix lint-inheritance drift

2 participants