Skip to content

Commit c6ceb4b

Browse files
authored
check toml fmt (#87)
* enforce toml formatting
1 parent 6630744 commit c6ceb4b

File tree

2 files changed

+31
-20
lines changed

2 files changed

+31
-20
lines changed

.github/workflows/check.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,14 @@ jobs:
125125
toolchain: ${{ matrix.msrv }}
126126
- name: cargo +${{ matrix.msrv }} check
127127
run: cargo check
128+
toml-fmt:
129+
runs-on: ubuntu-latest
130+
name: toml / fmt
131+
steps:
132+
- uses: actions/checkout@v4
133+
with:
134+
submodules: true
135+
- name: Install taplo
136+
uses: docker://docker.io/tamasfe/taplo:latest
137+
with:
138+
args: fmt --check --diff

.taplo.toml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
include = ["**/*.toml", "**/Cargo.toml", "Cargo.toml"]
22
[formatting]
3-
align_comments = true
4-
align_entries = true
5-
allowed_blank_lines = 1
6-
indent_entries = false
7-
reorder_arrays = false
8-
reorder_keys = true
9-
trailing_newline = true
3+
align_comments = true
4+
align_entries = true
5+
allowed_blank_lines = 1
6+
indent_entries = false
7+
reorder_arrays = false
8+
reorder_keys = true
9+
trailing_newline = true
1010

1111
[[rule]]
12-
formatting.align_entries = true
13-
formatting.array_auto_expand = false
14-
formatting.reorder_arrays = true
15-
formatting.reorder_keys = true
16-
include = ["Cargo.toml", "**/Cargo.toml"]
17-
keys = [
18-
"dependencies",
19-
"dev-dependencies",
20-
"build-dependencies",
21-
"workspace.dependencies",
22-
"workspace.dev-dependencies",
23-
"workspace.build-dependencies",
24-
]
12+
formatting.align_entries = true
13+
formatting.array_auto_expand = false
14+
formatting.reorder_arrays = true
15+
formatting.reorder_keys = true
16+
include = ["Cargo.toml", "**/Cargo.toml"]
17+
keys = [
18+
"dependencies",
19+
"dev-dependencies",
20+
"build-dependencies",
21+
"workspace.dependencies",
22+
"workspace.dev-dependencies",
23+
"workspace.build-dependencies",
24+
]

0 commit comments

Comments
 (0)