#!/usr/bin/env bash # Full local verification gate for PureYAML. # # Runs the checks required before completion, including the Claw Mini Linux # check when executed from macOS and the WASM SDK build check. set -euo pipefail # Exit code 77 from a gate means "skipped: runner/infrastructure unavailable" # (see scripts/check-linux.sh). A skip is non-fatal and must not block the # push; a real failure (any other non-zero) still aborts the whole gate. SKIP=77 run_gate() { name="$1" shift printf '\n==> %s\n' "$name" set +e "$@" status=$? set -e if [ "$status" -eq "$SKIP" ]; then printf ' SKIPPED (runner unavailable; authoritative gate runs on CI)\n' return 0 fi return "$status" } run_gate "style" bash scripts/check-style.sh run_gate "namespacing" bash scripts/check-namespacing.sh run_gate "validation coverage" bash scripts/check-validation-coverage.sh run_gate "forbidden patterns" bash scripts/check-forbidden-patterns.sh run_gate "changelog" bash scripts/check-changelog-touched.sh run_gate "swiftformat" swiftformat . --config .swiftformat --lint run_gate "swiftlint" swiftlint --config .swiftlint.yml --strict run_gate "swift build" swift build run_gate "swift test" swift test run_gate "linux" bash scripts/check-linux.sh run_gate "wasm" bash scripts/check-wasm.sh