openclaw/scripts/lint-swift.sh
Peter Steinberger 9ed5a04a65
ci: warn on size and performance limits in GitHub Actions
Source and performance budgets shared fatal exits with correctness checks,
so ordinary growth could block otherwise valid changes. Centralize limit
severity and GitHub annotations/summaries, keep local checks strict, and
carry warnings across native lint, container, and BuildKit boundaries.

Keep semantic lint, types, API inventories, source ownership, invalid
measurements, process failures, and runner admission guards blocking.

Validation: P2 review clean; three Linux owner-configuration replays and
20 standalone policy runs passed; typechecks, targeted type-aware lint,
Knip export scans, workflow checks, formatting, and diff checks passed.
The changed gate found a test environment typing error, corrected and
verified by the root-test typecheck. One unrelated preparation process
cleanup failure did not reproduce in its diagnostic replay; no fix claimed.
2026-09-23 02:35:32 -07:00

31 lines
656 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
repo_root="$(cd "$(dirname "$0")/.." && pwd)"
cd "$repo_root"
scope="${1:-all}"
if [[ "$scope" != "all" && "$scope" != "ios" && "$scope" != "macos" ]]; then
echo "usage: $0 [ios|macos]" >&2
exit 2
fi
./scripts/check-swift-tools.sh swiftlint
if [[ "$scope" != "ios" ]]; then
node "$repo_root/scripts/run-swiftlint.mts" --strict --config config/swiftlint.yml
(
cd apps/swabble
node "$repo_root/scripts/run-swiftlint.mts" --strict --config .swiftlint.yml
)
fi
if [[ "$scope" == "macos" ]]; then
exit 0
fi
(
cd apps/ios
node "$repo_root/scripts/run-swiftlint.mts" --strict --config .swiftlint.yml
)