Skip to content

Commit

Permalink
taplo for toml fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
rnbguy committed Apr 30, 2024
1 parent 62298c6 commit 8f40c59
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/code-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
FD_VERSION: 9.0.0
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Whitestapace lints
run: bash ci/code-quality/whitespace-lints.sh
Expand All @@ -19,3 +19,9 @@ jobs:
uses: crate-ci/[email protected] # NOTE: Newer versions detect false positives. Test locally before upgrading.
with:
config: ./.github/typos.toml

- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: baptiste0928/cargo-install@v3
with:
crate: taplo-cli
- run: taplo fmt --check
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ install-tools: ## Install development tools including nightly rustfmt, cargo-hac
rustup component add rustfmt --toolchain nightly
cargo install cargo-hack
cargo install cargo-release
cargo install typos-cli
cargo install typos-cli taplo-cli

lint: ## Lint the code using rustfmt, clippy and whitespace lints.
cargo +nightly fmt --all --check
cargo clippy --all-targets --all-features
cargo clippy --all-targets --no-default-features
typos --config $(CURDIR)/.github/typos.toml
bash ./ci/code-quality/whitespace-lints.sh
taplo fmt --check

check-features: ## Check that project compiles with all combinations of features.
cargo hack check --workspace --feature-powerset --exclude-features default
Expand Down
7 changes: 7 additions & 0 deletions taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include = [ "taplo.toml", "**/Cargo.toml" ]

[formatting]
align_entries = true
compact_arrays = false
array_auto_expand = false
array_auto_collapse = false

0 comments on commit 8f40c59

Please sign in to comment.