Skip to content

Commit 4cb0d29

Browse files
committed
Add taplo for TOML formatting
1 parent 666312e commit 4cb0d29

File tree

24 files changed

+182
-58
lines changed

24 files changed

+182
-58
lines changed

.github/workflows/autofix.yml

+14
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,17 @@ jobs:
4040

4141
# Get latest version from https://autofix.ci/setup
4242
- uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a
43+
44+
autofix-toml:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Install taplo
49+
run: |
50+
curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-x86_64.gz \
51+
| gzip -d - | install -m 755 /dev/stdin /usr/local/bin/taplo
52+
- run: |
53+
taplo fmt
54+
55+
# Get latest version from https://autofix.ci/setup
56+
- uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a

.github/workflows/toml.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "TOML checks"
2+
3+
on:
4+
merge_group:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
11+
jobs:
12+
fmt-check:
13+
name: "Formatting"
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: dtolnay/rust-toolchain@stable
18+
- name: Install taplo
19+
run: |
20+
curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-x86_64.gz \
21+
| gzip -d - | install -m 755 /dev/stdin /usr/local/bin/taplo
22+
- run: |
23+
taplo fmt
24+
CHANGES_IN_REPO=$(git status --porcelain)
25+
if [[ -n "$CHANGES_IN_REPO" ]]; then
26+
exit 1
27+
fi

.taplo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[formatting]
2+
indent_string = " "
3+
reorder_arrays = true

Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ version = "2.1.3"
1111

1212
[workspace.dependencies]
1313
schemars = "0.8.4"
14-
serde = { version = "1.0.192", default-features = false, features = ["derive", "alloc"] }
14+
serde = { version = "1.0.192", default-features = false, features = [
15+
"alloc",
16+
"derive",
17+
] }
1518

1619
[workspace.metadata.release]
1720
shared-version = true

_typos.toml

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
[default]
2-
extend-ignore-re = [
3-
"(?Rm)^.*(#|//)\\s*spellchecker:disable-line$",
4-
]
2+
extend-ignore-re = ["(?Rm)^.*(#|//)\\s*spellchecker:disable-line$"]
53

64
[files]
7-
extend-exclude = [
8-
"contracts/**/schema/**",
9-
"packages/crypto/**/*.json",
10-
]
5+
extend-exclude = ["contracts/**/schema/**", "packages/crypto/**/*.json"]

contracts/burner/Cargo.toml

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[package]
22
name = "burner"
33
version = "0.0.0"
4-
authors = ["Ethan Frey <[email protected]>", "Simon Warta <[email protected]>"]
4+
authors = [
5+
"Ethan Frey <[email protected]>",
6+
"Simon Warta <[email protected]>",
7+
]
58
edition = "2021"
69
publish = false
710
license = "Apache-2.0"
@@ -31,9 +34,14 @@ cranelift = ["cosmwasm-vm/cranelift"]
3134

3235
[dependencies]
3336
cosmwasm-schema = { path = "../../packages/schema" }
34-
cosmwasm-std = { path = "../../packages/std", features = ["iterator", "cosmwasm_1_4"] }
37+
cosmwasm-std = { path = "../../packages/std", features = [
38+
"cosmwasm_1_4",
39+
"iterator",
40+
] }
3541
schemars = "0.8.12"
3642
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
3743

3844
[dev-dependencies]
39-
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator"] }
45+
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = [
46+
"iterator",
47+
] }

contracts/crypto-verify/Cargo.toml

+11-3
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,23 @@ cranelift = ["cosmwasm-vm/cranelift"]
3131
[dependencies]
3232
base64 = "0.22.0"
3333
cosmwasm-schema = { path = "../../packages/schema" }
34-
cosmwasm-std = { path = "../../packages/std", features = ["cosmwasm_2_1", "iterator"] }
34+
cosmwasm-std = { path = "../../packages/std", features = [
35+
"cosmwasm_2_1",
36+
"iterator",
37+
] }
3538
hex = "0.4"
36-
p256 = { version = "0.13.2", default-features = false, features = ["alloc", "ecdsa"] }
39+
p256 = { version = "0.13.2", default-features = false, features = [
40+
"alloc",
41+
"ecdsa",
42+
] }
3743
rlp = "0.5"
3844
schemars = "0.8.12"
3945
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
4046
sha2 = "0.10"
4147
sha3 = "0.10"
4248

4349
[dev-dependencies]
44-
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator"] }
50+
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = [
51+
"iterator",
52+
] }
4553
hex-literal = "0.4.1"

contracts/cyberpunk/Cargo.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ cranelift = ["cosmwasm-vm/cranelift"]
2828

2929
[dependencies]
3030
cosmwasm-schema = { path = "../../packages/schema" }
31-
cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["std", "abort", "cosmwasm_1_3"] }
31+
cosmwasm-std = { path = "../../packages/std", default-features = false, features = [
32+
"abort",
33+
"cosmwasm_1_3",
34+
"std",
35+
] }
3236
rust-argon2 = "2.1"
3337
thiserror = "1.0.26"
3438

contracts/empty/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,6 @@ cosmwasm-std = { path = "../../packages/std", features = ["iterator"] }
3434
schemars = "0.8.12"
3535

3636
[dev-dependencies]
37-
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator"] }
37+
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = [
38+
"iterator",
39+
] }

contracts/floaty/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,6 @@ serde = { version = "1.0.103", default-features = false, features = ["derive"] }
3636
rand_chacha = { version = "0.3.1", default-features = false }
3737

3838
[dev-dependencies]
39-
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator"] }
39+
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = [
40+
"iterator",
41+
] }

contracts/hackatom/Cargo.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ cranelift = ["cosmwasm-vm/cranelift"]
3030

3131
[dependencies]
3232
cosmwasm-schema = { path = "../../packages/schema" }
33-
cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["std", "abort", "cosmwasm_2_2"] }
33+
cosmwasm-std = { path = "../../packages/std", default-features = false, features = [
34+
"abort",
35+
"cosmwasm_2_2",
36+
"std",
37+
] }
3438
schemars = "0.8.12"
3539
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
3640
sha2 = "0.10"

contracts/ibc-callbacks/Cargo.toml

+8-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,15 @@ cranelift = ["cosmwasm-vm/cranelift"]
2929

3030
[dependencies]
3131
cosmwasm-schema = { path = "../../packages/schema" }
32-
cosmwasm-std = { path = "../../packages/std", features = ["iterator", "stargate"] }
32+
cosmwasm-std = { path = "../../packages/std", features = [
33+
"iterator",
34+
"stargate",
35+
] }
3336
schemars = "0.8.3"
3437
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
3538

3639
[dev-dependencies]
37-
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator", "stargate"] }
40+
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = [
41+
"iterator",
42+
"stargate",
43+
] }

contracts/ibc-reflect-send/Cargo.toml

+9-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,16 @@ cranelift = ["cosmwasm-vm/cranelift"]
3030

3131
[dependencies]
3232
cosmwasm-schema = { path = "../../packages/schema" }
33-
cosmwasm-std = { path = "../../packages/std", features = ["iterator", "staking", "stargate"] }
33+
cosmwasm-std = { path = "../../packages/std", features = [
34+
"iterator",
35+
"staking",
36+
"stargate",
37+
] }
3438
schemars = "0.8.12"
3539
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
3640

3741
[dev-dependencies]
38-
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator", "stargate"] }
42+
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = [
43+
"iterator",
44+
"stargate",
45+
] }

contracts/ibc-reflect/Cargo.toml

+7-3
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,16 @@ cranelift = ["cosmwasm-vm/cranelift"]
3030

3131
[dependencies]
3232
cosmwasm-schema = { path = "../../packages/schema" }
33-
cosmwasm-std = { path = "../../packages/std", features = ["iterator", "stargate", "cosmwasm_2_2"] }
33+
cosmwasm-std = { path = "../../packages/std", features = [
34+
"cosmwasm_2_2",
35+
"iterator",
36+
"stargate",
37+
] }
3438
schemars = "0.8.12"
3539
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
3640

3741
[dev-dependencies]
3842
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = [
39-
"iterator",
40-
"stargate",
43+
"iterator",
44+
"stargate",
4145
] }

contracts/queue/Cargo.toml

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[package]
22
name = "queue"
33
version = "0.0.0"
4-
authors = ["Simon Warta <[email protected]>", "Ethan Frey <[email protected]>"]
4+
authors = [
5+
"Ethan Frey <[email protected]>",
6+
"Simon Warta <[email protected]>",
7+
]
58
edition = "2021"
69
publish = false
710
license = "Apache-2.0"
@@ -33,9 +36,14 @@ library = []
3336
[dependencies]
3437
cosmwasm-schema = { path = "../../packages/schema" }
3538
# cosmwasm_1_4 is enabled here for more efficient `range_keys` and `range_values`
36-
cosmwasm-std = { path = "../../packages/std", features = ["iterator", "cosmwasm_1_4"] }
39+
cosmwasm-std = { path = "../../packages/std", features = [
40+
"cosmwasm_1_4",
41+
"iterator",
42+
] }
3743
schemars = "0.8.12"
3844
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
3945

4046
[dev-dependencies]
41-
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator"] }
47+
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = [
48+
"iterator",
49+
] }

contracts/reflect/Cargo.toml

+9-2
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,17 @@ cranelift = ["cosmwasm-vm/cranelift"]
3131

3232
[dependencies]
3333
cosmwasm-schema = { path = "../../packages/schema" }
34-
cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["std", "staking", "stargate", "cosmwasm_2_2"] }
34+
cosmwasm-std = { path = "../../packages/std", default-features = false, features = [
35+
"cosmwasm_2_2",
36+
"staking",
37+
"stargate",
38+
"std",
39+
] }
3540
schemars = "0.8.12"
3641
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
3742
thiserror = "1.0.26"
3843

3944
[dev-dependencies]
40-
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["stargate"] }
45+
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = [
46+
"stargate",
47+
] }

contracts/staking/Cargo.toml

+7-2
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,15 @@ cranelift = ["cosmwasm-vm/cranelift"]
3030

3131
[dependencies]
3232
cosmwasm-schema = { path = "../../packages/schema" }
33-
cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["std", "staking"] }
33+
cosmwasm-std = { path = "../../packages/std", default-features = false, features = [
34+
"staking",
35+
"std",
36+
] }
3437
schemars = "0.8.12"
3538
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
3639
snafu = "0.8.2"
3740

3841
[dev-dependencies]
39-
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["staking"] }
42+
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = [
43+
"staking",
44+
] }

contracts/virus/Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,6 @@ serde = { version = "1.0.103", default-features = false, features = ["derive"] }
3636
thiserror = "1.0.26"
3737

3838
[dev-dependencies]
39-
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator"] }
39+
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = [
40+
"iterator",
41+
] }

deny.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ unlicensed = "deny"
7070
# See https://spdx.org/licenses/ for list of possible licenses
7171
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
7272
allow = [
73-
"Apache-2.0",
7473
"Apache-2.0 WITH LLVM-exception",
74+
"Apache-2.0",
7575
"BSD-2-Clause",
7676
"BSD-3-Clause",
7777
"CC0-1.0",
@@ -128,8 +128,8 @@ exceptions = [
128128
# and the crate will be checked normally, which may produce warnings or errors
129129
# depending on the rest of your configuration
130130
#license-files = [
131-
# Each entry is a crate relative path, and the (opaque) hash of its contents
132-
#{ path = "LICENSE", hash = 0xbd0eed23 }
131+
# Each entry is a crate relative path, and the (opaque) hash of its contents
132+
#{ path = "LICENSE", hash = 0xbd0eed23 }
133133
#]
134134

135135
[licenses.private]

packages/crypto/Cargo.toml

+5-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ark-ff = { version = "0.4.2", features = ["asm", "parallel"] }
1818
ark-serialize = "0.4.2"
1919
cosmwasm-core = { version = "2.1.3", path = "../core" }
2020
digest = "0.10"
21-
ecdsa = "0.16.2" # Not used directly, but needed to bump transitive dependency, see: https://github.com/CosmWasm/cosmwasm/pull/1899 for details.
21+
ecdsa = "0.16.2" # Not used directly, but needed to bump transitive dependency, see: https://github.com/CosmWasm/cosmwasm/pull/1899 for details.
2222
ed25519-zebra = { version = "4.0.3", default-features = false }
2323
k256 = { version = "0.13.3", default-features = false, features = ["ecdsa"] }
2424
num-traits = "0.2.18"
@@ -36,7 +36,10 @@ base64 = "0.22.0"
3636
base64-serde = "0.7.0"
3737
criterion = "0.5.1"
3838
rand_core = { version = "0.6", features = ["getrandom"] }
39-
serde = { version = "1.0.103", default-features = false, features = ["derive", "alloc"] }
39+
serde = { version = "1.0.103", default-features = false, features = [
40+
"alloc",
41+
"derive",
42+
] }
4043
serde_json = "1.0.40"
4144
sha2 = "0.10"
4245
sha3 = "0.10"

packages/go-gen/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ release = false
1010

1111
[dependencies]
1212
cosmwasm-std = { version = "2.1.3", path = "../std", features = [
13-
"cosmwasm_2_2",
14-
"staking",
15-
"stargate",
13+
"cosmwasm_2_2",
14+
"staking",
15+
"stargate",
1616
] }
1717
cosmwasm-schema = { version = "2.1.3", path = "../schema" }
1818
anyhow = "1"

packages/schema/Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
[package]
22
name = "cosmwasm-schema"
33
version.workspace = true
4-
authors = ["Simon Warta <[email protected]>", "Ethan Frey <[email protected]>"]
4+
authors = [
5+
"Ethan Frey <[email protected]>",
6+
"Simon Warta <[email protected]>",
7+
]
58
edition = "2021"
69
description = "A dev-dependency for CosmWasm contracts to generate JSON Schema files."
710
repository = "https://github.com/CosmWasm/cosmwasm/tree/main/packages/schema"

0 commit comments

Comments
 (0)