iridium-db 0.4.0

A high-performance vector-graph hybrid storage and indexing engine
HAS_CARGO := $(shell test -f Cargo.toml && echo 1 || echo 0)
CLIPPY_FEATURES ?=
CLIPPY_FEATURE_ARGS := $(if $(strip $(CLIPPY_FEATURES)),--features $(CLIPPY_FEATURES),)

.PHONY: fmt fmt-check lint test verify

fmt:
ifeq ($(HAS_CARGO),1)
	cargo fmt --all
endif
	taplo fmt

fmt-check:
ifeq ($(HAS_CARGO),1)
	cargo fmt --all --check
endif
	taplo fmt --check

lint:
ifeq ($(HAS_CARGO),1)
	cargo clippy --workspace --all-targets $(CLIPPY_FEATURE_ARGS) -- -D warnings
endif
	markdownlint-cli2 "**/*.md"
	yamllint .
	taplo check

test:
ifeq ($(HAS_CARGO),1)
	cargo test --workspace
else
	@echo "No cargo workspace; skipping cargo tests."
endif

verify: fmt-check lint test