#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2026 Marcus Baw and Baw Medical Ltd
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# The full local gate: fmt + clippy + tests, mirroring .github/workflows/ci.yml
# so a green run here means a green run there. It checks the default CLI build,
# the serde-only leaf engine, and the optional MCP feature. `s/version++` runs
# this before cutting a release; run it directly during development too.

set -euo pipefail
cd "$(git rev-parse --show-toplevel)"

cargo fmt --all --check
cargo clippy --all-targets -- -D warnings
cargo clippy --all-targets --features mcp -- -D warnings
cargo test
cargo test --no-default-features
cargo test --features mcp
