diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8aab9a24..db6cca4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,6 +74,14 @@ jobs: - name: cargo fmt run: cargo fmt --all --check + - name: Install Taplo + uses: uncenter/setup-taplo@09968a8ae38d66ddd3d23802c44bf6122d7aa991 # v1 + with: + version: "0.9.3" + + - name: Run taplo fmt + run: taplo fmt --check --diff + - name: install ripgrep run: | sudo apt update diff --git a/.taplo.toml b/.taplo.toml new file mode 100644 index 00000000..f0130461 --- /dev/null +++ b/.taplo.toml @@ -0,0 +1,11 @@ +# See https://taplo.tamasfe.dev/configuration/file.html +# and https://taplo.tamasfe.dev/configuration/formatter-options.html + +[formatting] +# Aligning comments with the largest line creates +# diff noise when neighboring lines are changed. +align_comments = false + +# Matches how rustfmt formats Rust code +column_width = 100 +indent_string = " "