Skip to content

Commit 45b4629

Browse files
authored
Merge pull request #2261 from CosmWasm/aw/taplo-toml
Add `taplo` for TOML formatting
2 parents 666312e + 87e0e60 commit 45b4629

File tree

24 files changed

+181
-58
lines changed

24 files changed

+181
-58
lines changed

.github/workflows/autofix.yml

Lines changed: 14 additions & 0 deletions
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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
- name: Install taplo
18+
run: |
19+
curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-full-linux-x86_64.gz \
20+
| gzip -d - | install -m 755 /dev/stdin /usr/local/bin/taplo
21+
- run: |
22+
taplo fmt
23+
CHANGES_IN_REPO=$(git status --porcelain)
24+
if [[ -n "$CHANGES_IN_REPO" ]]; then
25+
exit 1
26+
fi

.taplo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[formatting]
2+
indent_string = " "
3+
reorder_arrays = true

Cargo.toml

Lines changed: 4 additions & 1 deletion
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

Lines changed: 2 additions & 7 deletions
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

Lines changed: 11 additions & 3 deletions
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

Lines changed: 11 additions & 3 deletions
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

Lines changed: 5 additions & 1 deletion
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

Lines changed: 3 additions & 1 deletion
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

Lines changed: 3 additions & 1 deletion
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+
] }

0 commit comments

Comments
 (0)