set -e
echo "Running pre-commit checks..."
echo "Checking code formatting..."
cargo fmt --check
echo "Running clippy lints..."
cargo clippy --all-targets --all-features -- -D warnings
echo "Running tests..."
cargo test --quiet
echo "All pre-commit checks passed!"