Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deny warnings only in CI and xtask #1508

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ skip_crate_env_info = true

[env]
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
RUSTFLAGS = "-D warnings"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using -D warnings for cargo make while not using the same RUSTFLAGS for regular build invalidates the building cache.

You can run ./ci_checks.sh twice a row, and you will see that it starts building from scratch.


[tasks.check]
description = "Compile code without linking. Faster than build to detect problems."
Expand Down
1 change: 0 additions & 1 deletion bin/fuel-core-client/src/main.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 0 additions & 1 deletion bin/fuel-core/src/main.rs
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
1 change: 0 additions & 1 deletion crates/chain-config/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion crates/client/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
1 change: 0 additions & 1 deletion crates/database/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion crates/fuel-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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");

Expand Down
1 change: 0 additions & 1 deletion crates/metrics/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![deny(clippy::arithmetic_side_effects)]
#![deny(clippy::cast_possible_truncation)]
#![deny(unused_crate_dependencies)]
#![deny(warnings)]

use std::sync::OnceLock;

Expand Down
1 change: 0 additions & 1 deletion crates/services/consensus_module/bft/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![deny(clippy::arithmetic_side_effects)]
#![deny(clippy::cast_possible_truncation)]
#![deny(unused_crate_dependencies)]
#![deny(warnings)]
1 change: 0 additions & 1 deletion crates/services/consensus_module/poa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#![deny(clippy::cast_possible_truncation)]
#![deny(unused_crate_dependencies)]
#![deny(unused_must_use)]
#![deny(warnings)]

mod deadline_clock;
mod sync;
Expand Down
1 change: 0 additions & 1 deletion crates/services/consensus_module/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#![deny(clippy::cast_possible_truncation)]
#![deny(unused_crate_dependencies)]
#![deny(missing_docs)]
#![deny(warnings)]

extern crate core;

Expand Down
1 change: 0 additions & 1 deletion crates/services/executor/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![deny(clippy::arithmetic_side_effects)]
#![deny(clippy::cast_possible_truncation)]
#![deny(unused_crate_dependencies)]
#![deny(warnings)]

mod config;

Expand Down
1 change: 0 additions & 1 deletion crates/services/importer/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 0 additions & 1 deletion crates/services/producer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion crates/services/relayer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#![deny(unused_crate_dependencies)]
#![forbid(unsafe_code)]
#![deny(missing_docs)]
#![deny(warnings)]

pub(crate) mod abi;
pub(crate) mod config;
Expand Down
1 change: 0 additions & 1 deletion crates/services/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#![deny(clippy::cast_possible_truncation)]
#![deny(unused_crate_dependencies)]
#![deny(missing_docs)]
#![deny(warnings)]

mod service;
mod state;
Expand Down
2 changes: 1 addition & 1 deletion crates/services/sync/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 0 additions & 1 deletion crates/services/txpool/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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::{
Expand Down
1 change: 0 additions & 1 deletion crates/storage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion crates/types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
1 change: 0 additions & 1 deletion tests/tests/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![deny(unused_must_use)]
#![deny(warnings)]

mod balances;
mod blocks;
Expand Down
1 change: 0 additions & 1 deletion xtask/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![deny(unused_crate_dependencies)]
#![deny(warnings)]

use clap::Parser;
use commands::{
Expand Down
Loading