Skip to content

Commit 09f07d5

Browse files
authored
Remove workspace lints from templates (#4598)
This detaches the templates from monorepo's workspace lints, so the lints for the templates can evolve separately as needed. Currently the templates [re-use the monorepo's lints](https://github.com/paritytech/polkadot-sdk-minimal-template/blob/bd8afe66ec566d61f36b0e3d731145741a9e9e19/Cargo.toml#L16-L43) which looks weird. cc @kianenigma @gupnik
1 parent 2d3a693 commit 09f07d5

File tree

19 files changed

+11
-43
lines changed

19 files changed

+11
-43
lines changed

.github/workflows/misc-sync-templates.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ jobs:
105105
toml set templates/${{ matrix.template }}/Cargo.toml 'workspace.package.edition' "$(toml get --raw Cargo.toml 'workspace.package.edition')" > Cargo.temp
106106
mv Cargo.temp ./templates/${{ matrix.template }}/Cargo.toml
107107
108-
toml get Cargo.toml 'workspace.lints' --output-toml >> ./templates/${{ matrix.template }}/Cargo.toml
109-
110108
toml get Cargo.toml 'workspace.dependencies' --output-toml >> ./templates/${{ matrix.template }}/Cargo.toml
111109
working-directory: polkadot-sdk
112110
- name: Print the result Cargo.tomls for debugging

templates/minimal/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ repository.workspace = true
99
edition.workspace = true
1010
publish = false
1111

12-
[lints]
13-
workspace = true
14-
1512
[dependencies]
1613
minimal-template-node = { path = "./node" }
1714
minimal-template-runtime = { path = "./runtime" }

templates/minimal/node/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ edition.workspace = true
1010
publish = false
1111
build = "build.rs"
1212

13-
[lints]
14-
workspace = true
15-
1613
[package.metadata.docs.rs]
1714
targets = ["x86_64-unknown-linux-gnu"]
1815

templates/minimal/node/src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl std::str::FromStr for Consensus {
3232
} else if let Some(block_time) = s.strip_prefix("manual-seal-") {
3333
Consensus::ManualSeal(block_time.parse().map_err(|_| "invalid block time")?)
3434
} else {
35-
return Err("incorrect consensus identifier".into())
35+
return Err("incorrect consensus identifier".into());
3636
})
3737
}
3838
}

templates/minimal/node/src/service.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub fn new_partial(config: &Configuration) -> Result<Service, ServiceError> {
6161
})
6262
.transpose()?;
6363

64-
let executor = sc_service::new_wasm_executor(&config);
64+
let executor = sc_service::new_wasm_executor(config);
6565

6666
let (client, backend, keystore_container, task_manager) =
6767
sc_service::new_full_parts::<Block, RuntimeApi, _>(

templates/minimal/pallets/template/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ repository.workspace = true
99
edition.workspace = true
1010
publish = false
1111

12-
[lints]
13-
workspace = true
14-
1512
[package.metadata.docs.rs]
1613
targets = ["x86_64-unknown-linux-gnu"]
1714

templates/minimal/runtime/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ repository.workspace = true
99
edition.workspace = true
1010
publish = false
1111

12-
[lints]
13-
workspace = true
14-
1512
[dependencies]
1613
parity-scale-codec = { version = "3.6.12", default-features = false }
1714
scale-info = { version = "2.6.0", default-features = false }

templates/parachain/node/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ edition.workspace = true
1010
publish = false
1111
build = "build.rs"
1212

13-
[lints]
14-
workspace = true
15-
1613
# [[bin]]
1714
# name = "parachain-template-node"
1815

templates/parachain/node/src/cli.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::path::PathBuf;
22

33
/// Sub-commands supported by the collator.
4+
#[allow(clippy::large_enum_variant)]
45
#[derive(Debug, clap::Subcommand)]
56
pub enum Subcommand {
67
/// Build a chain specification.

templates/parachain/node/src/command.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,11 @@ pub fn run() -> Result<()> {
194194
cmd.run(partials.client)
195195
}),
196196
#[cfg(not(feature = "runtime-benchmarks"))]
197-
BenchmarkCmd::Storage(_) =>
198-
return Err(sc_cli::Error::Input(
199-
"Compile with --features=runtime-benchmarks \
197+
BenchmarkCmd::Storage(_) => Err(sc_cli::Error::Input(
198+
"Compile with --features=runtime-benchmarks \
200199
to enable storage benchmarks."
201-
.into(),
202-
)
203-
.into()),
200+
.into(),
201+
)),
204202
#[cfg(feature = "runtime-benchmarks")]
205203
BenchmarkCmd::Storage(cmd) => runner.sync_run(|config| {
206204
let partials = new_partial(&config)?;

0 commit comments

Comments
 (0)