#!/bin/sh # Run rustfmt check cargo fmt -- --check if [ $? -ne 0 ]; then echo "rustfmt check failed. Run 'cargo fmt' to fix." exit 1 fi # Run clippy cargo clippy --all-targets -- -D warnings if [ $? -ne 0 ]; then echo "clippy check failed. Fix the warnings above." exit 1 fi