Skip to content
27 changes: 27 additions & 0 deletions .github/workflows/taplo.yaml
Comment thread
aidan46 marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Taplo formatting and linting

on:
push:
paths: "**/Cargo.toml"
pull_request:
paths: "**/Cargo.toml"

jobs:
lint:
name: Lint Cargo.toml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: uncenter/[email protected]

- run: taplo lint --verbose
fmt:
name: Format Cargo.toml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: uncenter/[email protected]
Comment thread
aidan46 marked this conversation as resolved.
Outdated

- run: taplo format --check --verbose
Comment thread
aidan46 marked this conversation as resolved.
Outdated
6 changes: 6 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[[rule]]
include = ["**/Cargo.toml"]
Comment thread
aidan46 marked this conversation as resolved.
Outdated

[rule.formatting]
reorder_arrays = true
reorder_keys = true
Comment thread
aidan46 marked this conversation as resolved.