DOCS_MIN := 100
LCOV := lcov.info
.DEFAULT_GOAL := check
.PHONY: check test coverage coverage-html docs-coverage lint clean-coverage
check: lint test docs-coverage
test:
cargo test
coverage:
cargo llvm-cov --lcov --output-path $(LCOV)
cargo llvm-cov report --summary-only
coverage-html:
cargo llvm-cov --html
docs-coverage:
@cargo +nightly rustdoc --lib -- \
-Z unstable-options --show-coverage --output-format=json 2>/dev/null \
| DOCS_MIN=$(DOCS_MIN) python3 scripts/docs_coverage.py
lint:
cargo fmt --check
cargo clippy --all-targets -- -D warnings
clean-coverage:
cargo llvm-cov clean --workspace
rm -f $(LCOV)