From 6bd2e0b9cb6125a6aa549c9afcfa30ad5940213e Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Fri, 4 Oct 2024 10:57:23 -0400 Subject: [PATCH] test(ci): enforce TOML formatting with `taplo` 0.9.3 --- .github/pull_request_template.md | 1 + .github/workflows/ci.yml | 8 ++++++++ taplo.toml | 2 ++ 3 files changed, 11 insertions(+) create mode 100644 taplo.toml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 898771d8d..d7b9a62cd 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -17,6 +17,7 @@ person(s) who reviewed your changes. This will make sure it gets re-added to the **Checklist** - [ ] Run `cargo fmt`. +- [ ] Run `taplo format`. - [ ] Run `cargo clippy`. If applicable, add: - [ ] `--target wasm32-unknown-unknown` - [ ] `--target wasm32-unknown-emscripten` diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f56b6481d..bb7acad43 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -620,6 +620,14 @@ jobs: cargo fmt --manifest-path xtask/Cargo.toml -- --check cargo fmt --manifest-path naga/xtask/Cargo.toml -- --check + - name: Install Taplo + uses: uncenter/setup-taplo@v1 + with: + version: "0.9.3" + + - name: run `taplo fmt` + run: taplo format --check --diff + - name: Check for typos uses: crate-ci/typos@v1.24.6 diff --git a/taplo.toml b/taplo.toml new file mode 100644 index 000000000..9b3a9b621 --- /dev/null +++ b/taplo.toml @@ -0,0 +1,2 @@ +[formatting] +indent_string = " "