Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add taplo CI #4

Merged
merged 14 commits into from
May 15, 2024
27 changes: 27 additions & 0 deletions .github/workflows/taplo.yaml
aidan46 marked this conversation as resolved.
Show resolved Hide 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/setup-taplo@v1.0.8

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

- uses: uncenter/setup-taplo@v1.0.8
aidan46 marked this conversation as resolved.
Show resolved Hide resolved

- run: taplo format --check --verbose
aidan46 marked this conversation as resolved.
Show resolved Hide resolved
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"]
aidan46 marked this conversation as resolved.
Show resolved Hide resolved

[rule.formatting]
reorder_arrays = true
reorder_keys = true
aidan46 marked this conversation as resolved.
Show resolved Hide resolved