set -e
echo "Running pre-commit hooks..."
echo "Checking formatting (cargo fmt)..."
cargo fmt --all -- --check
echo "Linting with Clippy (cargo clippy)..."
cargo clippy --all-targets --all-features -- -D warnings
echo "Running tests (cargo test)..."
cargo test --all-targets --all-features
echo "All checks passed!"
exit 0