#!/bin/bash set -euo pipefail kind=${1:?Expected swift} shift (( $# > 0 )) || exit 0 case "$kind" in swift) swift format --in-place "$@" swift format lint --strict "$@" Scripts/check-swift-safety.sh "$@" ;; *) printf 'Unknown staged check: %s\n' "$kind" >&2; exit 2 ;; esac