.PHONY: check lint format test build clean doc doc-open help
all: check
help:
@echo "Available targets:"
@echo " check - Run all checks (lint + test + format-check)"
@echo " lint - Run Clippy with strict production settings"
@echo " format - Format code with rustfmt"
@echo " test - Run all tests"
@echo " build - Build in release mode"
@echo " clean - Clean build artifacts"
@echo " doc - Generate documentation"
check: lint test format-check
@echo "โ
All production checks passed!"
lint:
@echo "๐ Running production-grade Clippy checks..."
cargo clippy --lib --tests --all-features -- \
-D warnings \
-D clippy::all \
-D clippy::correctness \
-D clippy::suspicious \
-D clippy::complexity \
-D clippy::perf \
-D clippy::style \
-A clippy::missing_docs_in_private_items \
-A clippy::missing_errors_doc \
-A clippy::missing_panics_doc \
-A clippy::module_name_repetitions \
-A clippy::similar_names \
-A clippy::too_many_lines \
-A clippy::multiple_crate_versions \
-A clippy::wildcard_dependencies \
-A clippy::must_use_candidate \
-A clippy::missing_const_for_fn \
-A clippy::significant_drop_tightening \
-A clippy::equatable_if_let \
-A clippy::missing_fields_in_debug \
-A clippy::unused_async
format:
@echo "๐จ Formatting code..."
cargo fmt --all
format-check:
@echo "๐ Checking code formatting..."
cargo fmt --all -- --check
test:
@echo "๐งช Running tests..."
cargo test --lib --all-features
@echo "๐ Running library tests specifically..."
cargo test --lib --quiet
build:
@echo "๐๏ธ Building release version..."
cargo build --release --all-features
clean:
@echo "๐งน Cleaning build artifacts..."
cargo clean
doc:
@echo "๐ Generating documentation..."
cargo doc --all-features --no-deps
doc-open:
@echo "๐ Generating documentation..."
cargo doc --all-features --no-deps --open
audit:
@echo "๐ Running security audit..."
cargo audit
bench:
@echo "โก Running benchmarks..."
cargo bench
deps-check:
@echo "๐ฆ Checking dependencies..."
cargo machete || echo "Install cargo-machete for dependency checking: cargo install cargo-machete"
ci: lint test format-check build doc
@echo "๐ Full CI pipeline completed successfully!"