.PHONY: help lint lint-sort format format-sort test build clean check ci
help:
@echo "AllSource Core - Quality Gates & Development Commands"
@echo ""
@echo "Quality Gates (CI/CD):"
@echo " make check - Run all quality gates (format, lint, sort, test)"
@echo " make ci - Full CI pipeline (check + build)"
@echo ""
@echo "Linting:"
@echo " make lint - Check code formatting and run clippy"
@echo " make lint-sort - Check if Cargo.toml is sorted"
@echo ""
@echo "Formatting:"
@echo " make format - Auto-format code with rustfmt"
@echo " make format-sort - Auto-sort Cargo.toml dependencies"
@echo ""
@echo "Testing & Building:"
@echo " make test - Run all tests"
@echo " make build - Build the project"
@echo " make clean - Clean build artifacts"
lint:
@echo "→ Checking code formatting..."
@cargo fmt --check
@echo "→ Running clippy..."
@cargo clippy --all-targets --all-features -- -D warnings
lint-sort:
@echo "→ Checking Cargo.toml sort order..."
@cargo sort --check
format:
@echo "→ Formatting code..."
@cargo fmt
format-sort:
@echo "→ Sorting Cargo.toml..."
@cargo sort -w
test:
@echo "→ Running tests..."
@cargo test --lib
build:
@echo "→ Building project..."
@cargo build --lib
clean:
@echo "→ Cleaning build artifacts..."
@cargo clean
check: lint lint-sort test
@echo "✅ All quality gates passed!"
ci: check build
@echo "✅ CI pipeline completed successfully!"