Skip to content

Commit

Permalink
Merge pull request #7 from anoma/tiago/fmt-check
Browse files Browse the repository at this point in the history
justfile improvements + trigger fmt check in ci
  • Loading branch information
Fraccaman committed Jul 5, 2024
2 parents 20649ae + 8a38c91 commit 6f041ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
toolchain: nightly-2024-05-15
components: rustfmt
cache: true
- run: just fmt
- run: just fmt check

build:
if: ${{ github.event_name == 'pull_request' }}
Expand Down
12 changes: 6 additions & 6 deletions Justfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
nightly_version := prepend('+', `cat rust-nightly-version`)

help:
@echo fmt, clippy, clippy-fix, check or clean
@echo Available commands: `just --summary`

clean:
cargo clean

fmt:
cargo {{nightly_version}} fmt --all
fmt *CHECK:
cargo {{ nightly_version }} fmt --all {{ if CHECK == "check" { "-- --check" } else { "" } }}

clippy:
cargo {{nightly_version}} clippy
cargo {{ nightly_version }} clippy

clippy-fix:
cargo {{nightly_version}} clippy --fix --allow-dirty --allow-staged
cargo {{ nightly_version }} clippy --fix --allow-dirty --allow-staged

check:
cargo check
Expand All @@ -22,4 +22,4 @@ build:
cargo build

build-release:
cargo build --release
cargo build --release

0 comments on commit 6f041ad

Please sign in to comment.