Add justfile

This commit is contained in:
Jesse Braham 2024-12-14 12:51:40 +01:00
parent ffed778a71
commit 0967ef46a8
2 changed files with 54 additions and 0 deletions

2
.gitignore vendored
View File

@ -12,3 +12,5 @@ Cargo.lock
# Miscellaneous
.DS_Store
tarpaulin-report.html
*.profraw

52
justfile Executable file
View File

@ -0,0 +1,52 @@
#!/usr/bin/env -S just --justfile
log := "warn"
export JUST_LOG := log
_default:
@just --list --unsorted
# Build all packages
[group('build')]
build:
cargo build --release --workspace
# Build the specified package
[group('build')]
build-package PACKAGE:
cargo build --release --package={{PACKAGE}}
# Check test coverage of all packages in the workspace
[group('test')]
coverage:
cargo tarpaulin --workspace --out=Html --exclude=onihime-macros
# Test all packages
[group('test')]
test:
cargo test --workspace
# Test the specified package
[group('test')]
test-package PACKAGE:
cargo test --package={{PACKAGE}}
# Check the formatting of all packages
[group('lint')]
check-format:
cargo fmt --all -- --check
# Format all packages
[group('lint')]
format:
cargo fmt --all
# Run clippy checks for all packages
[group('lint')]
clippy:
cargo clippy --no-deps -- -D warnings -W clippy::all
# Check formatting and run clippy checks for all packages
[group('lint')]
lint: check-format clippy