Adopt the rules-swift pin-and-codify strategy in snapshot mode (third_party/rules-swift @97dc70f + sha256), add codified gates, a conformance audit ledger, and .github/workflows/rules-swift.yml (corpus-pin integrity required, full gate report mode). Remove the docs/rules mirror it supersedes (repo-specific files kept under docs/). Style and leak gates exclude the vendored corpus.
26 lines
859 B
Bash
Executable File
26 lines
859 B
Bash
Executable File
#!/bin/sh
|
|
# Full local gate. GitHub Actions are not assumed for this repo family.
|
|
set -eu
|
|
|
|
ROOT=$(cd "$(dirname "$0")/.." && pwd)
|
|
cd "$ROOT"
|
|
|
|
# The pinned corpus must be checked out, or the rules gate cannot verify anything.
|
|
if [ ! -e third_party/rules-swift/README.md ]; then
|
|
echo "check-local-gate: rules-swift submodule not initialized; run: git submodule update --init --recursive" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Hooks are a real part of the gate. A clone that skipped install must fail loud,
|
|
# not silently run with no commit-msg/attribution enforcement.
|
|
hooks_path=$(git config --get core.hooksPath || true)
|
|
if [ "$hooks_path" != ".githooks" ]; then
|
|
echo "check-local-gate: git hooks not installed (core.hooksPath='$hooks_path'); run: scripts/install-hooks.sh" >&2
|
|
exit 1
|
|
fi
|
|
|
|
scripts/check-rules-swift.sh
|
|
scripts/check-style.sh
|
|
swift build
|
|
swift test
|