echo "Running cargo fmt..."
cargo fmt --all
echo "Running cargo clippy fixes..."
cargo clippy --fix --allow-dirty
cargo clippy --all-targets --all-features -- -D warnings
if ! git diff --quiet; then
echo "⚠️ Code was formatted or Clippy-fix applied. Please review and commit again."
exit 1
fi