-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (36 loc) · 1.69 KB
/
Makefile
File metadata and controls
59 lines (36 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
SHELL := /bin/bash
# Nightly is used exclusively for `cargo fmt` (unstable rustfmt options)
RUST_NIGHTLY_VERSION := nightly-2026-03-15
.PHONY: help fmt fmt-check lint lint-clippy lint-fix check build test test-live coverage clean verify
.DEFAULT_GOAL := help
##@ Formatting
fmt: ## Format Rust code (uses nightly for unstable rustfmt options)
cargo +$(RUST_NIGHTLY_VERSION) fmt --all -- --color always
fmt-check: ## Check Rust formatting (uses nightly for unstable rustfmt options)
cargo +$(RUST_NIGHTLY_VERSION) fmt --all --check -- --color always
##@ Linting
lint: fmt-check lint-clippy ## Run all lints (fmt check + clippy)
lint-clippy: ## Run clippy lints
cargo clippy --all-targets --all-features -- -D warnings
lint-fix: ## Auto-fix clippy warnings where possible
cargo clippy --fix --allow-dirty --allow-staged --all-targets --all-features -- -D warnings
##@ Building
check: ## Type-check without producing binaries
cargo check --all-targets --all-features
build: ## Build in release mode
cargo build --release
##@ Testing
test: ## Run all tests
cargo test --all-features
test-live: ## Run the live provider example matrix (set PROVIDER=claude|codex|all)
./scripts/run-live-examples.sh $(PROVIDER)
coverage: ## Print code coverage summary
cargo llvm-cov --all-features --summary-only
##@ Verification
verify: fmt lint test ## Run fmt + lint + test (full verification)
##@ Cleanup
clean: ## Clean build artifacts
cargo clean
##@ Help
help: ## Show this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)