Set clippy lints in workspace (requires rust 1.74) (#2390)

We currently use a bit of a hack in `.cargo/config` to make sure that
clippy isn't too annoying by specifying the list of lints.

There is now a stable way to define lints for a workspace. The only down
side is that every crate seems to have to opt into this so there's a
*few* files modified in this PR.

Dependencies:

- [x] PR that upgrades CI to use rust 1.74 is merged.

---------

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
This commit is contained in:
Squirrel
2023-12-13 14:11:07 +00:00
committed by GitHub
parent 4c4407a893
commit be8e626806
471 changed files with 1430 additions and 37 deletions
@@ -6,6 +6,9 @@ edition.workspace = true
license.workspace = true
description = "Collator-side subsystem that handles incoming candidate submissions from the parachain."
[lints]
workspace = true
[dependencies]
futures = "0.3.21"
gum = { package = "tracing-gum", path = "../gum" }
@@ -6,6 +6,9 @@ edition.workspace = true
license.workspace = true
description = "Approval Voting Subsystem of the Polkadot node"
[lints]
workspace = true
[dependencies]
futures = "0.3.21"
futures-timer = "3.0.2"
+3
View File
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
futures = "0.3.21"
futures-timer = "3.0.2"
+3
View File
@@ -6,6 +6,9 @@ edition.workspace = true
license.workspace = true
description = "The Candidate Backing Subsystem. Tracks parachain candidates that can be backed, as well as the issuance of statements about candidates."
[lints]
workspace = true
[dependencies]
futures = "0.3.21"
sp-keystore = { path = "../../../../substrate/primitives/keystore" }
@@ -6,6 +6,9 @@ edition.workspace = true
license.workspace = true
description = "Bitfield signing subsystem for the Polkadot node"
[lints]
workspace = true
[dependencies]
futures = "0.3.21"
gum = { package = "tracing-gum", path = "../../gum" }
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
async-trait = "0.1.57"
futures = "0.3.21"
+3
View File
@@ -6,6 +6,9 @@ edition.workspace = true
license.workspace = true
description = "The Chain API subsystem provides access to chain related utility functions like block number to hash conversions."
[lints]
workspace = true
[dependencies]
futures = "0.3.21"
gum = { package = "tracing-gum", path = "../../gum" }
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
futures = "0.3.21"
futures-timer = "3"
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
futures = "0.3.21"
gum = { package = "tracing-gum", path = "../../gum" }
@@ -6,6 +6,9 @@ edition.workspace = true
license.workspace = true
description = "Parachains inherent data provider for Polkadot node"
[lints]
workspace = true
[dependencies]
futures = "0.3.21"
futures-timer = "3.0.2"
@@ -6,6 +6,9 @@ edition.workspace = true
license.workspace = true
description = "The Prospective Parachains subsystem. Tracks and handles prospective parachain fragments."
[lints]
workspace = true
[dependencies]
futures = "0.3.19"
gum = { package = "tracing-gum", path = "../../gum" }
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] }
futures = "0.3.21"
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
futures = "0.3.21"
thiserror = "1.0.48"
+3
View File
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
always-assert = "0.1"
blake3 = "1.5"
@@ -28,7 +28,8 @@ use tokio::{runtime::Handle, sync::Mutex};
const TEST_PREPARATION_TIMEOUT: Duration = Duration::from_secs(30);
struct TestHost {
// Keep a reference to the tempdir as it gets deleted on drop.
// Keep a reference to the tempdir otherwise it gets deleted on drop.
#[allow(dead_code)]
cache_dir: tempfile::TempDir,
host: Mutex<ValidationHost>,
}
+3
View File
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
cfg-if = "1.0"
cpu-time = "1.0.0"
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
cpu-time = "1.0.0"
gum = { package = "tracing-gum", path = "../../../gum" }
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
blake3 = "1.5"
cfg-if = "1.0"
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
futures = "0.3.21"
gum = { package = "tracing-gum", path = "../../gum" }
+3
View File
@@ -6,6 +6,9 @@ edition.workspace = true
license.workspace = true
description = "Stick logs together with the TraceID as provided by tempo"
[lints]
workspace = true
[dependencies]
coarsetime = "0.1.22"
tracing = "0.1.35"
+3
View File
@@ -6,6 +6,9 @@ edition.workspace = true
license.workspace = true
description = "Generate an overseer including builder pattern and message wrapper from a single annotated struct definition."
[lints]
workspace = true
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
+3
View File
@@ -6,6 +6,9 @@ edition.workspace = true
license.workspace = true
description = "Polkadot Jaeger primitives, but equally useful for Grafana/Tempo"
[lints]
workspace = true
[dependencies]
mick-jaeger = "0.1.8"
lazy_static = "1.4"
+3
View File
@@ -8,6 +8,9 @@ license.workspace = true
readme = "README.md"
publish = false
[lints]
workspace = true
[[bin]]
name = "malus"
path = "src/malus.rs"
+3
View File
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
futures = "0.3.21"
futures-timer = "3.0.2"
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
polkadot-node-metrics = { path = "../../metrics" }
polkadot-node-network-protocol = { path = "../protocol" }
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
futures = "0.3.21"
gum = { package = "tracing-gum", path = "../../gum" }
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
futures = "0.3.21"
schnellru = "0.2.1"
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
always-assert = "0.1"
futures = "0.3.21"
+3
View File
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
always-assert = "0.1"
async-trait = "0.1.57"
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
bitvec = { version = "1.0.1", default-features = false, features = ["alloc"] }
futures = "0.3.21"
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
futures = "0.3.21"
futures-timer = "3.0.2"
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
sp-application-crypto = { path = "../../../../substrate/primitives/application-crypto" }
sp-keystore = { path = "../../../../substrate/primitives/keystore" }
@@ -6,6 +6,9 @@ edition.workspace = true
license.workspace = true
description = "Primitives types for the Node-side"
[lints]
workspace = true
[dependencies]
async-channel = "1.8.0"
async-trait = "0.1.57"
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
futures = "0.3.21"
futures-timer = "3.0.2"
+3
View File
@@ -6,6 +6,9 @@ edition.workspace = true
license.workspace = true
description = "System overseer of the Polkadot node"
[lints]
workspace = true
[dependencies]
client = { package = "sc-client-api", path = "../../../substrate/client/api" }
sp-api = { path = "../../../substrate/primitives/api" }
+3
View File
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
bounded-vec = "0.7"
futures = "0.3.21"
+3
View File
@@ -7,6 +7,9 @@ edition.workspace = true
license.workspace = true
description = "Utils to tie different Polkadot components together and allow instantiation of a node."
[lints]
workspace = true
[dependencies]
# Substrate Client
sc-authority-discovery = { path = "../../../substrate/client/authority-discovery" }
@@ -7,6 +7,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
async-trait = "0.1.57"
futures = "0.3.21"
+3
View File
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
derive_more = "0.99.17"
futures = "0.3.21"
+3
View File
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
async-trait = "0.1.57"
futures = "0.3.21"
+3
View File
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
polkadot-overseer = { path = "../overseer" }
polkadot-node-subsystem-types = { path = "../subsystem-types" }
+3
View File
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] }
+3
View File
@@ -6,6 +6,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
futures = "0.3.21"
hex = "0.4.3"
@@ -5,3 +5,6 @@ version = "1.0.0"
authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
@@ -8,6 +8,9 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
tokio = { version = "1.24.2", default-features = false, features = ["macros", "net", "rt-multi-thread", "sync"] }
url = "2.3.1"