fix(contracts): remove crate-level lint suppressions and leftover scaffolding - #479
Merged
Penielka merged 1 commit intoAug 25, 2026
Conversation
…ffolding Drops the crate-wide `#![allow(...)]` attributes from lib.rs so real lint findings are no longer hidden for the whole codebase. The underlying issues are fixed (missing `Symbol` import in credentials.rs, manual checked divisions, range loops) and the remaining allowances are scoped to the individual modules/functions that legitimately need them (legacy `env.events().publish` event API pending `#[contractevent]` migration, and fixed contract-ABI argument counts). Also deletes src/lib_minimal.rs, a leftover build-verification stub that is not a test and is unreferenced by the crate. `cargo clippy -- -D warnings`, already part of CI for the contracts crate, now passes cleanly. Closes AetherEdu#474
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #474
Summary
Removes the crate-wide lint suppressions from
contracts/src/lib.rsso real findings are no longer hidden for the whole codebase, and deletes the leftoverlib_minimal.rsbuild-verification stub.Changes
#![allow(deprecated)],#![allow(clippy::too_many_arguments)],#![allow(clippy::manual_checked_ops)],#![allow(clippy::needless_range_loop)]from the crate root.Symbolimport (a genuine compile error that was previously the only thing failingcargo clippy -- -D warningsonmain).checked_mul/checked_div(clippymanual_checked_ops).needless_range_loop).#[allow(deprecated)]on the 16 modules that still emit events via the legacyenv.events().publishAPI, with a comment noting the pending#[contractevent]migration.#[allow(clippy::too_many_arguments)]on contract-ABI functions whose signatures must stay fixed (and on the#[contractimpl]block for macro-generated client wrappers).Verification
cargo clippy -- -D warnings(the CI command inbuild-contracts) passes cleanly.cargo build --releasesucceeds.cargo fmt --all -- --checkshows only pre-existing diffs in files untouched by this PR.Note:
cargo testtargets currently fail to compile onmaindue to pre-existing type errors in test files (e.g.dna_storage_test.rs); that is tracked separately and is not addressed here.