.DEFAULT_GOAL := help
.PHONY: build build-release check clean clippy fmt fmt-fix help install lint run snap test test-cov test-fresh watch
help:
@echo "Project: Alf CLI" | bat --language=help --style=plain
@echo "Usage: make <target>" | bat --language=help --style=plain
@echo ""
@echo "Targets:" | bat --language=help --style=plain
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " %-16s %s\n", $$1, $$2}' | bat --language=help --style=plain
build:
cargo build
build-release:
cargo build --release
check:
cargo check
clean:
cargo clean
clippy:
cargo clippy --all-targets --all-features -- -D warnings
fmt:
cargo fmt --check
fmt-fix:
cargo fmt
install:
cargo install --path .
lint: fmt clippy
run:
cargo run
snap:
cargo insta review
test:
cargo nextest run
test-cov:
cargo llvm-cov nextest --all-features --open
test-fresh:
cargo nextest run --no-capture
watch:
cargo watch -x build