.DEFAULT_GOAL := help
.PHONY: all lint test build coverage license docs docs-build lib-doc help
.PHONY: help
help:
@./help.sh ./Makefile
all: lint test build
lint:
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
test:
cargo nextest run --show-progress only
build:
cargo build --release
coverage:
cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
license:
@missing_license=""; \
for file in $$(find . -name "*.rs" -not -path "./target/*" -not -path "./.git/*"); do \
if ! grep -q "Copyright.* Contributors" "$$file"; then \
missing_license="$$missing_license\n$$file"; \
fi; \
done; \
if [ -n "$$missing_license" ]; then \
echo "Files missing license header:$$missing_license"; \
exit 1; \
fi
docs:
cd docs && bundle exec jekyll serve
docs-build:
cd docs && bundle exec jekyll build
lib-doc:
cargo doc