mirror of
https://github.com/abue-ammar/tinycast.git
synced 2026-10-02 00:04:44 +08:00
* Replace CI with CodeRabbit review * Soften the triage bot's wait-time wording
26 lines
813 B
Bash
Executable File
26 lines
813 B
Bash
Executable File
#!/bin/bash
|
|
# Lint the whole project. `--fix` auto-corrects the mechanical subset first.
|
|
# Formatting is a separate tool with its own caveats — see ./Scripts/format.sh.
|
|
set -uo pipefail
|
|
cd "$(dirname "$0")/.." || exit 1
|
|
|
|
command -v swiftlint >/dev/null || {
|
|
echo "✗ swiftlint not found. Install it with: brew install swiftlint" >&2
|
|
exit 2
|
|
}
|
|
|
|
[ "${1:-}" = "--fix" ] && swiftlint --fix --quiet
|
|
|
|
if ! swiftlint lint --quiet; then
|
|
echo
|
|
echo "Lint errors above. Warnings do not block; errors do." >&2
|
|
exit 1
|
|
fi
|
|
# A `Form` can't be asked what it holds, so an unclaimed anchor or an unmarked row is a silent
|
|
# no-op: the search result navigates and then nothing scrolls or lights up. Nothing else catches it.
|
|
if ! node Scripts/check-settings-search.js; then
|
|
exit 1
|
|
fi
|
|
|
|
echo "✓ lint-clean"
|