set -e
echo "Running pre-commit checks..."
echo " cargo fmt --check"
cargo fmt --all -- --check
echo " cargo clippy"
cargo clippy --all-targets --all-features -- -D warnings
if command -v apdev-rs >/dev/null 2>&1; then
echo " apdev-rs check-chars"
apdev-rs check-chars src/
else
echo " apdev-rs not found, skipping check-chars (run 'make setup' to install)"
fi
echo "All checks passed!"