Skip to content

Commit

Permalink
chore: add free inherit lints in crates (#1781)
Browse files Browse the repository at this point in the history
All crates not inheriting from workspace lints fail the workspace lints
and will be handled separately.

Motivation: consistent linting across project and in the CI.

Note: found an unrelated cargo doc bug in starknet_api_test_utils,
not sure why this wasn't triggered thus far, lints are unrelated.

Co-Authored-By: Gilad Chase <gilad@starkware.com>
  • Loading branch information
giladchase and Gilad Chase authored Nov 4, 2024
1 parent 432a2dd commit 16bd879
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 20 deletions.
1 change: 0 additions & 1 deletion crates/batcher_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ edition.workspace = true
license.workspace = true
repository.workspace = true


[lints]
workspace = true

Expand Down
1 change: 0 additions & 1 deletion crates/consensus_manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ edition.workspace = true
license.workspace = true
repository.workspace = true


[lints]
workspace = true

Expand Down
3 changes: 2 additions & 1 deletion crates/mempool_test_utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ edition.workspace = true
repository.workspace = true
license.workspace = true

[features]
[lints]
workspace = true

[dependencies]
assert_matches.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/mempool_test_utils/src/starknet_api_test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ impl MultiAccountTransactionGenerator {
}

/// Manages transaction generation for a single account.
/// Supports faulty transaction generation via [AccountTransactionGenerator::generate_raw].
/// Supports faulty transaction generation via [AccountTransactionGenerator::generate_raw_invoke].
///
/// This struct provides methods to generate both default and fully customized transactions,
/// with room for future extensions.
Expand Down
3 changes: 3 additions & 0 deletions crates/papyrus_base_layer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ edition.workspace = true
repository.workspace = true
license-file.workspace = true

[lints]
workspace = true

[dependencies]
alloy-contract.workspace = true
alloy-dyn-abi.workspace = true
Expand Down
6 changes: 2 additions & 4 deletions crates/papyrus_config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,5 @@ lazy_static.workspace = true
papyrus_test_utils.workspace = true
tempfile.workspace = true

[lints.rust]
# See [here](https://github.com/taiki-e/cargo-llvm-cov/issues/370) for a discussion on why this is
# needed (from rust 1.80).
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] }
[lints]
workspace = true
6 changes: 2 additions & 4 deletions crates/papyrus_load_test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,5 @@ tokio.workspace = true
lazy_static.workspace = true
pretty_assertions.workspace = true

[lints.rust]
# See [here](https://github.com/taiki-e/cargo-llvm-cov/issues/370) for a discussion on why this is
# needed (from rust 1.80).
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] }
[lints]
workspace = true
6 changes: 2 additions & 4 deletions crates/papyrus_monitoring_gateway/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,5 @@ pretty_assertions.workspace = true
starknet_client = { workspace = true, features = ["testing"] }
tower = { workspace = true, features = ["util"] }

[lints.rust]
# See [here](https://github.com/taiki-e/cargo-llvm-cov/issues/370) for a discussion on why this is
# needed (from rust 1.80).
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] }
[lints]
workspace = true
3 changes: 3 additions & 0 deletions crates/papyrus_network_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ libp2p = { workspace = true, features = ["serde"] }
papyrus_test_utils = { workspace = true, optional = true }
rand_chacha = { workspace = true, optional = true }
serde = { workspace = true, features = ["derive"] }

[lints]
workspace = true
3 changes: 3 additions & 0 deletions crates/papyrus_proc_macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ prometheus-parse.workspace = true

[lib]
proc-macro = true

[lints]
workspace = true
3 changes: 3 additions & 0 deletions crates/sequencing/papyrus_consensus_orchestrator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ papyrus_network = { workspace = true, features = ["testing"] }
papyrus_storage = { workspace = true, features = ["testing"] }
papyrus_test_utils.workspace = true
test-case.workspace = true

[lints]
workspace = true
6 changes: 2 additions & 4 deletions crates/starknet_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,5 @@ papyrus_test_utils.workspace = true
# `strum` is used by `EnumIter` which is used in this crate.
ignored = ["rand", "rand_chacha", "strum"]

[lints.rust]
# See [here](https://github.com/taiki-e/cargo-llvm-cov/issues/370) for a discussion on why this is
# needed (from rust 1.80).
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] }
[lints]
workspace = true

0 comments on commit 16bd879

Please sign in to comment.