set -euo pipefail
echo "Running pre-commit checks..."
echo " Checking formatting..."
cargo ci-fmt
echo " Formatting OK."
echo " Running clippy..."
cargo ci-lint
echo " Clippy OK."
if [[ "${HOLODECK_PRECOMMIT_TEST:-0}" == "1" ]]; then
echo " Running tests..."
cargo ci-test
echo " Tests OK."
fi
echo "Pre-commit checks passed."