Skip to content

Commit cbaeb4e

Browse files
committed
CI: check Cargo.toml formatting
1 parent cb06180 commit cbaeb4e

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,15 @@ jobs:
107107
with:
108108
command: update
109109
args: --package num-traits --precise 0.2.18
110-
- name: Check formatting
110+
- name: Setup Taplo
111+
if: matrix.lint
112+
uses: uncenter/setup-taplo@v1
113+
with:
114+
version: "0.8.1"
115+
- name: Check Cargo.toml formatting
116+
if: matrix.lint
117+
run: taplo fmt --check --diff
118+
- name: Check sourcecode formatting
111119
if: matrix.lint
112120
uses: actions-rs/cargo@v1
113121
with:

.taplo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include = [".taplo.toml", "Cargo.toml"]
2+
3+
[formatting]
4+
indent_string = " "

Cargo.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,17 @@ categories = ["api-bindings", "os::windows-apis"]
1313

1414
[dependencies]
1515
cfg-if = "1.0"
16-
winapi = { version = "0.3.9", features = ["impl-default", "impl-debug", "minwindef", "minwinbase", "timezoneapi", "winerror", "winnt", "winreg", "handleapi"] }
16+
winapi = { version = "0.3.9", features = [
17+
"impl-default",
18+
"impl-debug",
19+
"minwindef",
20+
"minwinbase",
21+
"timezoneapi",
22+
"winerror",
23+
"winnt",
24+
"winreg",
25+
"handleapi",
26+
] }
1727
chrono = { version = "0.4.6", optional = true }
1828
serde = { version = "1", optional = true }
1929

0 commit comments

Comments
 (0)