mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-30 00:47:13 +00:00
dda841d8de
refactor(ecstore): retire the set_disk lint blankets by making the prelude explicit
backlog#1823 step 1 / backlog#2029 road 2. Removes the last two module-level lint blankets in ecstore: set_disk/mod.rs #![allow(unused_imports)] and #![allow(unused_variables)], restoring both lints for the whole 40K-line subtree, and deletes the register line for the unused_variables blanket in the same diff (the guard from #6155 is a bidirectional exact match).
The unused_imports blanket existed because 14 submodules consumed mod.rs as a glob prelude (use super::* / use super::super::*), and rustc does not track consumption through glob re-exports. Each glob is now an explicit use super::{...} list, keeping mod.rs as the single import hub while making every import lint-checkable. Names consumed only by test or test-util units carry #[cfg(test)] / #[cfg(all(test, feature = "test-util"))] / #[cfg(any(test, feature = "test-util"))] gates matching their consumers; storage-api traits are routed through the storage_api_contracts facade per the architecture guard.
The sweep then deleted the genuinely dead imports the blanket was hiding (chrono::Utc, glob::Pattern, futures::task::AtomicWaker, rustfs_lock LocalLock, AsyncBatchProcessor, rand::Rng, std::future::Future among others in mod.rs, plus stale scoped imports and one empty test module shell across the subtree). One unused_variables finding surfaced: flush_read_version_coalescer_pending's lane_key is read only by the #[cfg(test)] counter block, handled with the cfg(not(test)) let _ pattern established in #6158.
Verification: cargo check zero warnings versus the 9cf276ed2 baseline on five lanes (default lib / --tests / rio-v2 --tests / test-util --tests / test-util,rio-v2 --tests; the --tests lane keeps the same three pre-existing core/pools.rs and store/object.rs dead-code warnings main already has); clippy --lib --tests -D warnings clean with test-util,rio-v2; cargo nextest run 4567 passed; make pre-commit exit 0.
113 lines
6.5 KiB
Plaintext
113 lines
6.5 KiB
Plaintext
# ecstore module-level lint blanket register (backlog#1823 step 9)
|
|
#
|
|
# Each line is `path|lint` for a `#![allow(<lint>)]` at the top of an ecstore
|
|
# source file. These blankets disable the lint for a whole module, so a real
|
|
# defect introduced anywhere in the file goes unreported.
|
|
#
|
|
# The guard in scripts/check_architecture_migration_rules.sh compares this file
|
|
# against the tree and fails on ANY difference, in either direction:
|
|
#
|
|
# * a blanket not listed here -> new suppression, justify it in the PR
|
|
# * a line here with no blanket -> delete the line in the same PR
|
|
#
|
|
# Exact match is deliberate. A "no new entries" rule would let the register rot
|
|
# into an amnesty list, which is the failure mode backlog#1834 found in the
|
|
# layer-dependency baseline. Removing a blanket must cost one line here, so the
|
|
# register can only shrink.
|
|
#
|
|
# `#![allow(dead_code)]` is NOT listed: ecstore carries zero of those after the
|
|
# step 2 burn-down, and the guard asserts that count stays at zero.
|
|
crates/ecstore/src/bucket/lifecycle/tier_last_day_stats.rs|clippy::all
|
|
crates/ecstore/src/bucket/lifecycle/tier_last_day_stats.rs|unused_must_use
|
|
crates/ecstore/src/bucket/lifecycle/tier_last_day_stats.rs|unused_variables
|
|
crates/ecstore/src/bucket/lifecycle/tier_sweeper.rs|clippy::all
|
|
crates/ecstore/src/bucket/lifecycle/tier_sweeper.rs|unused_must_use
|
|
crates/ecstore/src/bucket/lifecycle/tier_sweeper.rs|unused_variables
|
|
crates/s3-client/src/api_error_response.rs|clippy::all
|
|
crates/s3-client/src/api_error_response.rs|unused_must_use
|
|
crates/s3-client/src/api_error_response.rs|unused_variables
|
|
crates/s3-client/src/api_get_object.rs|clippy::all
|
|
crates/s3-client/src/api_get_object.rs|unused_must_use
|
|
crates/s3-client/src/api_get_object.rs|unused_variables
|
|
crates/s3-client/src/api_get_options.rs|clippy::all
|
|
crates/s3-client/src/api_get_options.rs|unused_must_use
|
|
crates/s3-client/src/api_get_options.rs|unused_variables
|
|
crates/s3-client/src/api_list.rs|clippy::all
|
|
crates/s3-client/src/api_list.rs|unused_must_use
|
|
crates/s3-client/src/api_list.rs|unused_variables
|
|
crates/s3-client/src/api_put_object.rs|clippy::all
|
|
crates/s3-client/src/api_put_object.rs|unused_must_use
|
|
crates/s3-client/src/api_put_object.rs|unused_variables
|
|
crates/s3-client/src/api_put_object_common.rs|clippy::all
|
|
crates/s3-client/src/api_put_object_common.rs|unused_must_use
|
|
crates/s3-client/src/api_put_object_common.rs|unused_variables
|
|
crates/s3-client/src/api_put_object_multipart.rs|clippy::all
|
|
crates/s3-client/src/api_put_object_multipart.rs|unused_must_use
|
|
crates/s3-client/src/api_put_object_multipart.rs|unused_variables
|
|
crates/s3-client/src/api_put_object_streaming.rs|clippy::all
|
|
crates/s3-client/src/api_put_object_streaming.rs|unused_must_use
|
|
crates/s3-client/src/api_put_object_streaming.rs|unused_variables
|
|
crates/s3-client/src/api_remove.rs|clippy::all
|
|
crates/s3-client/src/api_remove.rs|unused_must_use
|
|
crates/s3-client/src/api_remove.rs|unused_variables
|
|
crates/s3-client/src/api_s3_datatypes.rs|clippy::all
|
|
crates/s3-client/src/api_s3_datatypes.rs|unused_must_use
|
|
crates/s3-client/src/api_s3_datatypes.rs|unused_variables
|
|
crates/s3-client/src/api_stat.rs|clippy::all
|
|
crates/s3-client/src/api_stat.rs|unused_must_use
|
|
crates/s3-client/src/api_stat.rs|unused_variables
|
|
crates/s3-client/src/bucket_cache.rs|clippy::all
|
|
crates/s3-client/src/bucket_cache.rs|unused_must_use
|
|
crates/s3-client/src/bucket_cache.rs|unused_variables
|
|
crates/s3-client/src/checksum.rs|clippy::all
|
|
crates/s3-client/src/checksum.rs|unused_must_use
|
|
crates/s3-client/src/checksum.rs|unused_variables
|
|
crates/s3-client/src/constants.rs|unused_must_use
|
|
crates/s3-client/src/constants.rs|unused_variables
|
|
crates/s3-client/src/credentials.rs|clippy::all
|
|
crates/s3-client/src/credentials.rs|unused_must_use
|
|
crates/s3-client/src/credentials.rs|unused_variables
|
|
crates/ecstore/src/object_api/object_api_utils.rs|clippy::all
|
|
crates/ecstore/src/object_api/object_api_utils.rs|unused_must_use
|
|
crates/ecstore/src/object_api/object_api_utils.rs|unused_variables
|
|
crates/s3-client/src/transition_api.rs|clippy::all
|
|
crates/s3-client/src/transition_api.rs|unused_must_use
|
|
crates/s3-client/src/transition_api.rs|unused_variables
|
|
crates/ecstore/src/services/event_notification.rs|unused_variables
|
|
crates/ecstore/src/services/tier/tier.rs|clippy::all
|
|
crates/ecstore/src/services/tier/tier.rs|unused_must_use
|
|
crates/ecstore/src/services/tier/tier.rs|unused_variables
|
|
crates/ecstore/src/services/tier/tier_admin.rs|clippy::all
|
|
crates/ecstore/src/services/tier/tier_admin.rs|unused_must_use
|
|
crates/ecstore/src/services/tier/tier_admin.rs|unused_variables
|
|
crates/ecstore/src/services/tier/warm_backend.rs|clippy::all
|
|
crates/ecstore/src/services/tier/warm_backend.rs|unused_must_use
|
|
crates/ecstore/src/services/tier/warm_backend.rs|unused_variables
|
|
crates/ecstore/src/services/tier/warm_backend_aliyun.rs|clippy::all
|
|
crates/ecstore/src/services/tier/warm_backend_aliyun.rs|unused_must_use
|
|
crates/ecstore/src/services/tier/warm_backend_aliyun.rs|unused_variables
|
|
crates/ecstore/src/services/tier/warm_backend_azure.rs|clippy::all
|
|
crates/ecstore/src/services/tier/warm_backend_azure.rs|unused_must_use
|
|
crates/ecstore/src/services/tier/warm_backend_azure.rs|unused_variables
|
|
crates/ecstore/src/services/tier/warm_backend_gcs.rs|clippy::all
|
|
crates/ecstore/src/services/tier/warm_backend_gcs.rs|unused_must_use
|
|
crates/ecstore/src/services/tier/warm_backend_gcs.rs|unused_variables
|
|
crates/ecstore/src/services/tier/warm_backend_huaweicloud.rs|clippy::all
|
|
crates/ecstore/src/services/tier/warm_backend_huaweicloud.rs|unused_must_use
|
|
crates/ecstore/src/services/tier/warm_backend_huaweicloud.rs|unused_variables
|
|
crates/ecstore/src/services/tier/warm_backend_minio.rs|clippy::all
|
|
crates/ecstore/src/services/tier/warm_backend_minio.rs|unused_must_use
|
|
crates/ecstore/src/services/tier/warm_backend_minio.rs|unused_variables
|
|
crates/ecstore/src/services/tier/warm_backend_r2.rs|clippy::all
|
|
crates/ecstore/src/services/tier/warm_backend_r2.rs|unused_must_use
|
|
crates/ecstore/src/services/tier/warm_backend_r2.rs|unused_variables
|
|
crates/ecstore/src/services/tier/warm_backend_rustfs.rs|clippy::all
|
|
crates/ecstore/src/services/tier/warm_backend_rustfs.rs|unused_must_use
|
|
crates/ecstore/src/services/tier/warm_backend_rustfs.rs|unused_variables
|
|
crates/ecstore/src/services/tier/warm_backend_s3.rs|clippy::all
|
|
crates/ecstore/src/services/tier/warm_backend_s3.rs|unused_must_use
|
|
crates/ecstore/src/services/tier/warm_backend_s3.rs|unused_variables
|
|
crates/ecstore/src/services/tier/warm_backend_tencent.rs|clippy::all
|
|
crates/ecstore/src/services/tier/warm_backend_tencent.rs|unused_must_use
|
|
crates/ecstore/src/services/tier/warm_backend_tencent.rs|unused_variables
|