From c6ceb4b80f51da100344619abcec348cd0a7d410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Mello?= <3285133+asmello@users.noreply.github.com> Date: Sun, 20 Oct 2024 21:13:51 +0100 Subject: [PATCH] check toml fmt (#87) * enforce toml formatting --- .github/workflows/check.yml | 11 ++++++++++ .taplo.toml | 40 ++++++++++++++++++------------------- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 657343e..febe3c4 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -125,3 +125,14 @@ jobs: toolchain: ${{ matrix.msrv }} - name: cargo +${{ matrix.msrv }} check run: cargo check + toml-fmt: + runs-on: ubuntu-latest + name: toml / fmt + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Install taplo + uses: docker://docker.io/tamasfe/taplo:latest + with: + args: fmt --check --diff diff --git a/.taplo.toml b/.taplo.toml index ece5edc..66e2ba0 100644 --- a/.taplo.toml +++ b/.taplo.toml @@ -1,24 +1,24 @@ include = ["**/*.toml", "**/Cargo.toml", "Cargo.toml"] [formatting] - align_comments = true - align_entries = true - allowed_blank_lines = 1 - indent_entries = false - reorder_arrays = false - reorder_keys = true - trailing_newline = true +align_comments = true +align_entries = true +allowed_blank_lines = 1 +indent_entries = false +reorder_arrays = false +reorder_keys = true +trailing_newline = true [[rule]] - formatting.align_entries = true - formatting.array_auto_expand = false - formatting.reorder_arrays = true - formatting.reorder_keys = true - include = ["Cargo.toml", "**/Cargo.toml"] - keys = [ - "dependencies", - "dev-dependencies", - "build-dependencies", - "workspace.dependencies", - "workspace.dev-dependencies", - "workspace.build-dependencies", - ] +formatting.align_entries = true +formatting.array_auto_expand = false +formatting.reorder_arrays = true +formatting.reorder_keys = true +include = ["Cargo.toml", "**/Cargo.toml"] +keys = [ + "dependencies", + "dev-dependencies", + "build-dependencies", + "workspace.dependencies", + "workspace.dev-dependencies", + "workspace.build-dependencies", +]