.PHONY: help test test-watch build run clean clippy fmt fmt-check setup-hooks install-hooks
help:
@echo "Available commands:"
@echo " test - Run all tests"
@echo " test-watch - Run tests in watch mode"
@echo " build - Build the project"
@echo " run - Run the application"
@echo " clean - Clean build artifacts"
@echo " clippy - Run Clippy linter"
@echo " fmt - Format code"
@echo " fmt-check - Check code formatting"
@echo " setup-hooks - Install Git pre-commit hooks"
@echo " check-all - Run all checks (tests, clippy, formatting)"
test:
@echo "๐งช Running tests..."
cargo test
test-watch:
@echo "๐งช Running tests in watch mode..."
cargo watch -x test
build:
@echo "๐จ Building project..."
cargo build
build-release:
@echo "๐จ Building project in release mode..."
cargo build --release
run:
@echo "๐ Running application..."
cargo run
clean:
@echo "๐งน Cleaning build artifacts..."
cargo clean
clippy:
@echo "๐ Running Clippy..."
cargo clippy --all-targets --all-features -- -D warnings
fmt:
@echo "๐ Formatting code..."
cargo fmt --all
fmt-check:
@echo "๐ Checking code formatting..."
cargo fmt --all -- --check
setup-hooks:
@echo "๐ง Setting up Git hooks..."
./scripts/setup-git-hooks.sh
install-hooks: setup-hooks
check-all: test clippy fmt-check
@echo "โ
All checks passed!"
dev-setup: setup-hooks
@echo "๐ ๏ธ Development environment setup complete!"
@echo "๐ก Use 'make test-watch' for continuous testing during development"
ci: test clippy fmt-check
@echo "๐ค CI checks completed!"