-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (47 loc) · 1.84 KB
/
Makefile
File metadata and controls
63 lines (47 loc) · 1.84 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
60
61
62
63
.PHONY: help check fmt clippy test clean install-pre-commit
# Default target
help: ## Show this help message
@echo "md-book Development Commands"
@echo "============================"
@echo ""
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
# Development commands
check: ## Run cargo check
cargo check --all-targets --all-features
fmt: ## Check code formatting
cargo fmt --all -- --check
fmt-fix: ## Fix code formatting
cargo fmt --all
clippy: ## Run clippy lints
cargo clippy --all-targets --all-features -- -D warnings
clippy-pedantic: ## Run clippy with pedantic lints
cargo clippy --all-targets --all-features -- -W clippy::all -W clippy::pedantic -W clippy::nursery -W clippy::cargo
test: ## Run tests
cargo test --lib --bins
test-integration: ## Run integration tests
cargo test --test integration --features "tokio,search,syntax-highlighting"
test-all: ## Run all tests including integration and e2e
cargo test --lib --bins --test integration --test e2e --features "tokio,search,syntax-highlighting"
# Quality assurance
qa: fmt clippy test ## Run all quality checks (format, lint, test)
# Build commands
build: ## Build the project
cargo build
build-release: ## Build release version
cargo build --release
# Cleanup
clean: ## Clean build artifacts
cargo clean
# Pre-commit setup
install-pre-commit: ## Install pre-commit hooks
./scripts/setup-pre-commit.sh
# Development workflow
dev-check: check fmt clippy test ## Complete development check
@echo "✅ All checks passed!"
# CI simulation
ci-local: ## Run CI checks locally
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --lib --bins
cargo test --test integration --features "tokio,search,syntax-highlighting"
@echo "✅ CI checks passed locally!"