From c5965e1c57508656eee065dc29b1a2377a85c7ee Mon Sep 17 00:00:00 2001 From: Hannes Karppila Date: Thu, 23 Nov 2023 11:31:48 +0200 Subject: [PATCH] Deny warnings only in CI and xtask --- Makefile.toml | 1 + bin/fuel-core-client/src/main.rs | 1 - bin/fuel-core/src/main.rs | 1 - crates/chain-config/src/lib.rs | 1 - crates/client/src/lib.rs | 2 +- crates/database/src/lib.rs | 1 - crates/fuel-core/src/lib.rs | 1 - crates/metrics/src/lib.rs | 1 - crates/services/consensus_module/bft/src/lib.rs | 1 - crates/services/consensus_module/poa/src/lib.rs | 1 - crates/services/consensus_module/src/lib.rs | 1 - crates/services/executor/src/lib.rs | 1 - crates/services/importer/src/lib.rs | 1 - crates/services/producer/src/lib.rs | 1 - crates/services/relayer/src/lib.rs | 1 - crates/services/src/lib.rs | 1 - crates/services/sync/src/lib.rs | 2 +- crates/services/txpool/src/lib.rs | 1 - crates/storage/src/lib.rs | 1 - crates/types/src/lib.rs | 1 - tests/tests/lib.rs | 1 - xtask/src/main.rs | 1 - 22 files changed, 3 insertions(+), 21 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index 7f46f6b8041..478408dc0cf 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -22,6 +22,7 @@ skip_crate_env_info = true [env] CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true +RUSTFLAGS = "-D warnings" [tasks.check] description = "Compile code without linking. Faster than build to detect problems." diff --git a/bin/fuel-core-client/src/main.rs b/bin/fuel-core-client/src/main.rs index f6048a31937..41d989dffea 100644 --- a/bin/fuel-core-client/src/main.rs +++ b/bin/fuel-core-client/src/main.rs @@ -1,7 +1,6 @@ #![deny(clippy::arithmetic_side_effects)] #![deny(clippy::cast_possible_truncation)] #![deny(unused_crate_dependencies)] -#![deny(warnings)] use clap::Parser; use fuel_core_client::client::FuelClient; diff --git a/bin/fuel-core/src/main.rs b/bin/fuel-core/src/main.rs index e7f5c817980..6f97123e6fd 100644 --- a/bin/fuel-core/src/main.rs +++ b/bin/fuel-core/src/main.rs @@ -1,7 +1,6 @@ #![deny(clippy::arithmetic_side_effects)] #![deny(clippy::cast_possible_truncation)] #![deny(unused_crate_dependencies)] -#![deny(warnings)] // Use Jemalloc for main binary #[global_allocator] diff --git a/crates/chain-config/src/lib.rs b/crates/chain-config/src/lib.rs index 13d413dfc2d..74f0c499963 100644 --- a/crates/chain-config/src/lib.rs +++ b/crates/chain-config/src/lib.rs @@ -1,7 +1,6 @@ #![deny(clippy::cast_possible_truncation)] #![deny(clippy::arithmetic_side_effects)] #![deny(unused_crate_dependencies)] -#![deny(warnings)] pub mod config; pub mod fee_collection_contract; diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index f10aac15b82..b1d3fe78556 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -1,6 +1,6 @@ #![deny(clippy::arithmetic_side_effects)] #![deny(clippy::cast_possible_truncation)] #![deny(unused_crate_dependencies)] -#![deny(warnings)] + pub mod client; pub mod schema; diff --git a/crates/database/src/lib.rs b/crates/database/src/lib.rs index d7417682717..81011ecb49e 100644 --- a/crates/database/src/lib.rs +++ b/crates/database/src/lib.rs @@ -8,7 +8,6 @@ #![deny(clippy::cast_possible_truncation)] #![deny(missing_docs)] #![deny(unused_crate_dependencies)] -#![deny(warnings)] use fuel_core_storage::Error as StorageError; use fuel_core_types::services::executor::Error as ExecutorError; diff --git a/crates/fuel-core/src/lib.rs b/crates/fuel-core/src/lib.rs index ed4c86cfa76..c726af75cd8 100644 --- a/crates/fuel-core/src/lib.rs +++ b/crates/fuel-core/src/lib.rs @@ -1,7 +1,6 @@ #![deny(clippy::arithmetic_side_effects)] #![deny(clippy::cast_possible_truncation)] #![deny(unused_crate_dependencies)] -#![deny(warnings)] pub const VERSION: &str = env!("CARGO_PKG_VERSION"); diff --git a/crates/metrics/src/lib.rs b/crates/metrics/src/lib.rs index 9a7ad26f851..3f29ebeef3e 100644 --- a/crates/metrics/src/lib.rs +++ b/crates/metrics/src/lib.rs @@ -1,7 +1,6 @@ #![deny(clippy::arithmetic_side_effects)] #![deny(clippy::cast_possible_truncation)] #![deny(unused_crate_dependencies)] -#![deny(warnings)] use std::sync::OnceLock; diff --git a/crates/services/consensus_module/bft/src/lib.rs b/crates/services/consensus_module/bft/src/lib.rs index 63f47aa5d2e..d8038af0f20 100644 --- a/crates/services/consensus_module/bft/src/lib.rs +++ b/crates/services/consensus_module/bft/src/lib.rs @@ -1,4 +1,3 @@ #![deny(clippy::arithmetic_side_effects)] #![deny(clippy::cast_possible_truncation)] #![deny(unused_crate_dependencies)] -#![deny(warnings)] diff --git a/crates/services/consensus_module/poa/src/lib.rs b/crates/services/consensus_module/poa/src/lib.rs index 1be9c9ad009..c3336ac085e 100644 --- a/crates/services/consensus_module/poa/src/lib.rs +++ b/crates/services/consensus_module/poa/src/lib.rs @@ -2,7 +2,6 @@ #![deny(clippy::cast_possible_truncation)] #![deny(unused_crate_dependencies)] #![deny(unused_must_use)] -#![deny(warnings)] mod deadline_clock; mod sync; diff --git a/crates/services/consensus_module/src/lib.rs b/crates/services/consensus_module/src/lib.rs index bcc45592cc7..968a0e6ef9b 100644 --- a/crates/services/consensus_module/src/lib.rs +++ b/crates/services/consensus_module/src/lib.rs @@ -3,7 +3,6 @@ #![deny(clippy::cast_possible_truncation)] #![deny(unused_crate_dependencies)] #![deny(missing_docs)] -#![deny(warnings)] extern crate core; diff --git a/crates/services/executor/src/lib.rs b/crates/services/executor/src/lib.rs index 09f5f4e6534..c13684b702c 100644 --- a/crates/services/executor/src/lib.rs +++ b/crates/services/executor/src/lib.rs @@ -1,7 +1,6 @@ #![deny(clippy::arithmetic_side_effects)] #![deny(clippy::cast_possible_truncation)] #![deny(unused_crate_dependencies)] -#![deny(warnings)] mod config; diff --git a/crates/services/importer/src/lib.rs b/crates/services/importer/src/lib.rs index 018264660f2..ab2b76994b8 100644 --- a/crates/services/importer/src/lib.rs +++ b/crates/services/importer/src/lib.rs @@ -1,7 +1,6 @@ #![deny(clippy::arithmetic_side_effects)] #![deny(clippy::cast_possible_truncation)] #![deny(unused_crate_dependencies)] -#![deny(warnings)] pub mod config; pub mod importer; diff --git a/crates/services/producer/src/lib.rs b/crates/services/producer/src/lib.rs index 9a4007ba9fe..5892d4cabc2 100644 --- a/crates/services/producer/src/lib.rs +++ b/crates/services/producer/src/lib.rs @@ -2,7 +2,6 @@ #![deny(clippy::cast_possible_truncation)] #![deny(unused_crate_dependencies)] #![deny(unused_must_use)] -#![deny(warnings)] pub mod block_producer; pub mod config; diff --git a/crates/services/relayer/src/lib.rs b/crates/services/relayer/src/lib.rs index 9aa70b6b553..1c83ec5e06b 100644 --- a/crates/services/relayer/src/lib.rs +++ b/crates/services/relayer/src/lib.rs @@ -5,7 +5,6 @@ #![deny(unused_crate_dependencies)] #![forbid(unsafe_code)] #![deny(missing_docs)] -#![deny(warnings)] pub(crate) mod abi; pub(crate) mod config; diff --git a/crates/services/src/lib.rs b/crates/services/src/lib.rs index 12333c5b50d..4115e130f81 100644 --- a/crates/services/src/lib.rs +++ b/crates/services/src/lib.rs @@ -3,7 +3,6 @@ #![deny(clippy::cast_possible_truncation)] #![deny(unused_crate_dependencies)] #![deny(missing_docs)] -#![deny(warnings)] mod service; mod state; diff --git a/crates/services/sync/src/lib.rs b/crates/services/sync/src/lib.rs index 15f1e2f67fd..931aced9a06 100644 --- a/crates/services/sync/src/lib.rs +++ b/crates/services/sync/src/lib.rs @@ -2,7 +2,7 @@ #![deny(clippy::cast_possible_truncation)] #![deny(unused_crate_dependencies)] #![deny(missing_docs)] -#![deny(warnings)] + //! # Sync Service //! Responsible for syncing the blockchain from the network. diff --git a/crates/services/txpool/src/lib.rs b/crates/services/txpool/src/lib.rs index 607be531308..89587235699 100644 --- a/crates/services/txpool/src/lib.rs +++ b/crates/services/txpool/src/lib.rs @@ -1,7 +1,6 @@ #![deny(clippy::arithmetic_side_effects)] #![deny(clippy::cast_possible_truncation)] #![deny(unused_crate_dependencies)] -#![deny(warnings)] use fuel_core_types::{ services::txpool::{ diff --git a/crates/storage/src/lib.rs b/crates/storage/src/lib.rs index 8ff7593b34a..61fdb37cafd 100644 --- a/crates/storage/src/lib.rs +++ b/crates/storage/src/lib.rs @@ -8,7 +8,6 @@ #![deny(clippy::cast_possible_truncation)] #![deny(unused_crate_dependencies)] #![deny(missing_docs)] -#![deny(warnings)] use fuel_core_types::services::executor::Error as ExecutorError; diff --git a/crates/types/src/lib.rs b/crates/types/src/lib.rs index 5f7c4743ddc..acd87a648be 100644 --- a/crates/types/src/lib.rs +++ b/crates/types/src/lib.rs @@ -6,7 +6,6 @@ #![deny(clippy::cast_possible_truncation)] #![deny(unused_crate_dependencies)] #![deny(missing_docs)] -#![deny(warnings)] #[doc(no_inline)] pub use fuel_vm_private::{ diff --git a/tests/tests/lib.rs b/tests/tests/lib.rs index 9932f39ab2b..821395859c3 100644 --- a/tests/tests/lib.rs +++ b/tests/tests/lib.rs @@ -1,5 +1,4 @@ #![deny(unused_must_use)] -#![deny(warnings)] mod balances; mod blocks; diff --git a/xtask/src/main.rs b/xtask/src/main.rs index ea5b21572cd..aed736dd444 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -1,5 +1,4 @@ #![deny(unused_crate_dependencies)] -#![deny(warnings)] use clap::Parser; use commands::{