CARGO := cargo
.DEFAULT_GOAL := help
.PHONY: help build release check test test-fast test-acceptance test-acceptance-verbose doc fmt fmt-check lint validate clean bench run-example install dev
build: validate
$(CARGO) build
release: validate
$(CARGO) build --release
test: fmt-check lint
$(CARGO) build
$(CARGO) test --test lib
test-fast:
$(CARGO) test --lib --bins
$(CARGO) test --test lib semantic_include_types_test::
$(CARGO) test --test lib cli_test::
$(CARGO) test --test lib integration_test::
test-acceptance:
$(CARGO) test --test lib acceptance:: --no-fail-fast
test-acceptance-verbose:
$(CARGO) test --test lib acceptance:: --no-fail-fast -- --nocapture
run-example:
$(CARGO) run -- --help
install:
$(CARGO) install --path .
dev:
$(CARGO) run -- examples/sample-project
check:
$(CARGO) check --all-targets
fmt:
$(CARGO) fmt
fmt-check:
$(CARGO) fmt -- --check
lint:
$(CARGO) clippy --all-targets --all-features -- -D warnings
validate: fmt-check lint
@echo "✅ Code quality validation successful."
clean:
$(CARGO) clean
doc:
$(CARGO) doc --open
bench:
$(CARGO) bench
update:
$(CARGO) update
audit:
$(CARGO) audit
watch:
cargo watch -x build
watch-test:
cargo watch -x test
coverage:
cargo tarpaulin --out Html
help:
@echo "context-creator - High-performance CLI tool to convert codebases to Markdown for LLM context"
@echo ""
@echo "Usage: make [target]"
@echo ""
@echo "Available targets:"
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_0-9-]+:.*?## / {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort