#!/bin/sh
# Pre-push hook: run the same checks as CI before pushing.
# Enable with: git config core.hooksPath .githooks

set -e

echo "🔍 Running pre-push checks (same as CI)..."

echo "  [1/3] cargo fmt --check"
cargo fmt --check

echo "  [2/3] cargo clippy -- -D warnings"
cargo clippy -- -D warnings

echo "  [3/3] cargo test"
cargo test

echo "✅ All checks passed. Pushing..."
