Files
SwiftLint/tools/test-analyze.sh
2023-01-19 17:04:21 -05:00

15 lines
343 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
readonly swiftlint="$RUNFILES_DIR/_main/swiftlint"
if [[ ! -x "$swiftlint" ]]; then
echo "SwiftLint not found at $swiftlint"
exit 1
fi
# Change to workspace directory
cd "$(dirname "$(readlink Package.swift)")"
swift build --build-tests
"$swiftlint" analyze --strict --compile-commands ".build/debug.yaml"