From 0967ef46a8d501e674b15a94019b3d5ce2951007 Mon Sep 17 00:00:00 2001 From: Jesse Braham Date: Sat, 14 Dec 2024 12:51:40 +0100 Subject: [PATCH] Add `justfile` --- .gitignore | 2 ++ justfile | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100755 justfile diff --git a/.gitignore b/.gitignore index 81549e5..e4c6c63 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ Cargo.lock # Miscellaneous .DS_Store +tarpaulin-report.html +*.profraw diff --git a/justfile b/justfile new file mode 100755 index 0000000..e7b3351 --- /dev/null +++ b/justfile @@ -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