Skip to content

Commit a7a471a

Browse files
committed
ensure consistent formatting
1 parent 151d34f commit a7a471a

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ jobs:
2727
with:
2828
components: rustfmt, clippy
2929
- uses: swatinem/rust-cache@v2
30-
- name: cargo fmt
31-
run: cargo fmt --all -- --check
30+
- uses: taiki-e/install-action@cargo-make
3231
- name: cargo clippy
3332
run: cargo clippy --locked --workspace --all-targets --all-features
33+
- run: cargo make format-check
3434

3535
test:
3636
runs-on: ${{ matrix.target.os }}

Makefile.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Use cargo-make to run tasks here: https://crates.io/crates/cargo-make
2+
3+
[tasks.format]
4+
workspace = false
5+
command = "cargo"
6+
args = [
7+
"fmt",
8+
"--all",
9+
"--",
10+
"--config",
11+
"unstable_features=true",
12+
"--config",
13+
"imports_granularity=Crate,group_imports=StdExternalCrate,reorder_imports=true,format_code_in_doc_comments=true",
14+
]
15+
16+
[tasks.format-check]
17+
workspace = false
18+
command = "cargo"
19+
args = [
20+
"fmt",
21+
"--all",
22+
"--check",
23+
"--",
24+
"--config",
25+
"unstable_features=true",
26+
"--config",
27+
"imports_granularity=Crate,group_imports=StdExternalCrate,reorder_imports=true,format_code_in_doc_comments=true",
28+
]

0 commit comments

Comments
 (0)