-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (40 loc) · 1.25 KB
/
Makefile
File metadata and controls
54 lines (40 loc) · 1.25 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
.PHONY: test
test: ## Run the tests with nextest
cargo nextest run
.PHONY: test-cargo
test-cargo: ## Run the tests with built-in cargo test
cargo test --all-features
.PHONY: doctest
doctest: ## Run doc tests
cargo test --doc --all-features
.PHONY: test-all
test-all: test doctest ## Run all tests including doctests
.PHONY: check
check: ## Run Cargo check
cargo check --all-targets --all-features
.PHONY: fmt
fmt: ## Format code
cargo fmt --all
.PHONY: fmt-check
fmt-check: ## Check code formatting
cargo fmt --all -- --check
.PHONY: clippy
clippy: ## Run clippy
cargo clippy --all-targets --all-features -- -D warnings
.PHONY: doc
doc: ## Build documentation
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
.PHONY: ci
ci: fmt-check clippy test-cargo ## Run all CI checks
.PHONY: clippy-fix
clippy-fix: ## Run clippy with automatic fixes
cargo clippy --all-targets --all-features --fix
.PHONY: install-nextest
install-nextest: ## Install cargo-nextest
@echo "Installing cargo-nextest..."
cargo install cargo-nextest --locked
@echo "cargo-nextest installed"
.DEFAULT_GOAL := help
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'