Enforce consistent and correct toml formatting (#2518)

Using taplo, fixes all our broken and inconsistent toml formatting and
adds CI to keep them tidy.

If people want we can customise the format rules as described here
https://taplo.tamasfe.dev/configuration/formatter-options.html

@ggwpez, I suggest zepter is used only for checking features are
propagated, and leave formatting for taplo to avoid duplicate work and
conflicts.

TODO
- [x] Use `exclude = [...]` syntax in taplo file to ignore zombienet
tests instead of deleting the dir

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
Liam Aharon
2023-12-01 11:38:02 +04:00
committed by GitHub
parent 52132636d9
commit 4a293bc5a2
364 changed files with 2325 additions and 2287 deletions
+13 -13
View File
@@ -9,7 +9,7 @@ homepage = "https://substrate.io"
repository.workspace = true
description = "FRAME pallet for WASM contracts"
readme = "README.md"
include = ["src/**/*", "benchmarks/**", "build.rs", "README.md", "CHANGELOG.md"]
include = ["CHANGELOG.md", "README.md", "benchmarks/**", "build.rs", "src/**/*"]
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
@@ -37,19 +37,19 @@ rand_pcg = { version = "0.3", optional = true }
# Substrate Dependencies
environmental = { version = "1.1.4", default-features = false }
frame-benchmarking = { path = "../benchmarking", default-features = false, optional = true }
frame-support = { path = "../support", default-features = false}
frame-system = { path = "../system", default-features = false}
pallet-balances = { path = "../balances", default-features = false , optional = true}
frame-support = { path = "../support", default-features = false }
frame-system = { path = "../system", default-features = false }
pallet-balances = { path = "../balances", default-features = false, optional = true }
pallet-contracts-uapi = { path = "uapi" }
pallet-contracts-proc-macro = { path = "proc-macro" }
sp-api = { path = "../../primitives/api", default-features = false}
sp-core = { path = "../../primitives/core", default-features = false}
sp-io = { path = "../../primitives/io", default-features = false}
sp-runtime = { path = "../../primitives/runtime", default-features = false}
sp-std = { path = "../../primitives/std", default-features = false}
sp-api = { path = "../../primitives/api", default-features = false }
sp-core = { path = "../../primitives/core", default-features = false }
sp-io = { path = "../../primitives/io", default-features = false }
sp-runtime = { path = "../../primitives/runtime", default-features = false }
sp-std = { path = "../../primitives/std", default-features = false }
xcm = { package = "staging-xcm", path = "../../../polkadot/xcm", default-features = false}
xcm-builder = { package = "staging-xcm-builder", path = "../../../polkadot/xcm/xcm-builder", default-features = false}
xcm = { package = "staging-xcm", path = "../../../polkadot/xcm", default-features = false }
xcm-builder = { package = "staging-xcm-builder", path = "../../../polkadot/xcm/xcm-builder", default-features = false }
[dev-dependencies]
array-bytes = "6.1"
@@ -60,7 +60,7 @@ wat = "1"
pallet-contracts-fixtures = { path = "./fixtures" }
# Polkadot Dependencies
xcm-builder = {package = "staging-xcm-builder", path = "../../../polkadot/xcm/xcm-builder"}
xcm-builder = { package = "staging-xcm-builder", path = "../../../polkadot/xcm/xcm-builder" }
# Substrate Dependencies
pallet-balances = { path = "../balances" }
@@ -74,7 +74,7 @@ sp-keystore = { path = "../../primitives/keystore" }
sp-tracing = { path = "../../primitives/tracing" }
[features]
default = [ "std" ]
default = ["std"]
std = [
"codec/std",
"environmental/std",
@@ -20,5 +20,3 @@ toml = "0.8.8"
twox-hash = "1.6.3"
anyhow = "1.0.0"
cfg-if = { version = "1.0", default-features = false }
@@ -6,4 +6,3 @@ authors.workspace = true
edition.workspace = true
license.workspace = true
description = "Common utilities for pallet-contracts-fixtures."
@@ -9,36 +9,36 @@ repository.workspace = true
description = "A mock network for testing pallet-contracts"
[dependencies]
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = [ "derive", "max-encoded-len"] }
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = ["derive", "max-encoded-len"] }
frame-support = { path = "../../support", default-features = false}
frame-system = { path = "../../system", default-features = false}
frame-support = { path = "../../support", default-features = false }
frame-system = { path = "../../system", default-features = false }
pallet-assets = { path = "../../assets" }
pallet-balances = { path = "../../balances" }
pallet-contracts = { path = ".." }
pallet-contracts-uapi = { path = "../uapi", default-features = false}
pallet-contracts-uapi = { path = "../uapi", default-features = false }
pallet-contracts-proc-macro = { path = "../proc-macro" }
pallet-insecure-randomness-collective-flip = { path = "../../insecure-randomness-collective-flip" }
pallet-message-queue = { path = "../../message-queue" }
pallet-proxy = { path = "../../proxy" }
pallet-timestamp = { path = "../../timestamp" }
pallet-utility = { path = "../../utility" }
pallet-xcm = { path = "../../../../polkadot/xcm/pallet-xcm", default-features = false}
polkadot-parachain-primitives = { path = "../../../../polkadot/parachain" }
polkadot-primitives = { path = "../../../../polkadot/primitives" }
polkadot-runtime-parachains = {path = "../../../../polkadot/runtime/parachains"}
pallet-xcm = { path = "../../../../polkadot/xcm/pallet-xcm", default-features = false }
polkadot-parachain-primitives = { path = "../../../../polkadot/parachain" }
polkadot-primitives = { path = "../../../../polkadot/primitives" }
polkadot-runtime-parachains = { path = "../../../../polkadot/runtime/parachains" }
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
sp-api = { path = "../../../primitives/api", default-features = false}
sp-core = { path = "../../../primitives/core", default-features = false}
sp-io = { path = "../../../primitives/io", default-features = false}
sp-api = { path = "../../../primitives/api", default-features = false }
sp-core = { path = "../../../primitives/core", default-features = false }
sp-io = { path = "../../../primitives/io", default-features = false }
sp-keystore = { path = "../../../primitives/keystore" }
sp-runtime = { path = "../../../primitives/runtime", default-features = false}
sp-std = { path = "../../../primitives/std", default-features = false}
sp-runtime = { path = "../../../primitives/runtime", default-features = false }
sp-std = { path = "../../../primitives/std", default-features = false }
sp-tracing = { path = "../../../primitives/tracing" }
xcm = { package = "staging-xcm", path = "../../../../polkadot/xcm", default-features = false}
xcm-builder = {package = "staging-xcm-builder", path = "../../../../polkadot/xcm/xcm-builder"}
xcm-executor = { package = "staging-xcm-executor", path = "../../../../polkadot/xcm/xcm-executor", default-features = false}
xcm-simulator = {path = "../../../../polkadot/xcm/xcm-simulator"}
xcm = { package = "staging-xcm", path = "../../../../polkadot/xcm", default-features = false }
xcm-builder = { package = "staging-xcm-builder", path = "../../../../polkadot/xcm/xcm-builder" }
xcm-executor = { package = "staging-xcm-executor", path = "../../../../polkadot/xcm/xcm-executor", default-features = false }
xcm-simulator = { path = "../../../../polkadot/xcm/xcm-simulator" }
[dev-dependencies]
assert_matches = "1"
@@ -46,7 +46,7 @@ pretty_assertions = "1"
pallet-contracts-fixtures = { path = "../fixtures" }
[features]
default = [ "std" ]
default = ["std"]
std = [
"codec/std",
"frame-support/std",
@@ -0,0 +1,33 @@
[package]
name = "pallet-contracts-primitives"
version = "24.0.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
homepage = "https://substrate.io"
repository.workspace = true
description = "A crate that hosts a common definitions that are relevant for the pallet-contracts."
readme = "README.md"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
bitflags = "1.0"
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = ["derive"] }
# Substrate Dependencies (This crate should not rely on frame)
sp-std = { path = "../../../primitives/std", default-features = false }
sp-runtime = { path = "../../../primitives/runtime", default-features = false }
sp-weights = { path = "../../../primitives/weights", default-features = false }
[features]
default = ["std"]
std = [
"codec/std",
"scale-info/std",
"sp-runtime/std",
"sp-std/std",
"sp-weights/std",
]
+3 -4
View File
@@ -11,13 +11,12 @@ description = "Exposes all the host functions that a contract can import."
[dependencies]
paste = { version = "1.0", default-features = false }
bitflags = "1.0"
scale-info = { version = "2.10.0", default-features = false, features = ["derive"], optional = true }
scale-info = { version = "2.10.0", default-features = false, features = ["derive"], optional = true }
scale = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = [
"derive",
"max-encoded-len",
], optional = true }
[features]
default = [ "scale" ]
scale = [ "dep:scale", "scale-info" ]
default = ["scale"]
scale = ["dep:scale", "scale-info"]