From 066e4d5f6db899dd92ec7aea27743d68528849a1 Mon Sep 17 00:00:00 2001 From: Ladislas de Toldi Date: Mon, 11 Dec 2023 00:05:58 +0100 Subject: [PATCH] :recycle: (tuist): Refactor swiftlint post build script --- Scripts/SwiftLintRunScript.sh | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/Scripts/SwiftLintRunScript.sh b/Scripts/SwiftLintRunScript.sh index 318025ccf3..c3b717c954 100755 --- a/Scripts/SwiftLintRunScript.sh +++ b/Scripts/SwiftLintRunScript.sh @@ -18,24 +18,8 @@ if ! command -v swiftlint &> /dev/null; then exit 1 fi -if ! command -v gxargs &> /dev/null; then - echo "error: gxargs not installed, download from https://www.gnu.org/software/findutils/" - echo "error: or install with brew install findutils" - exit 1 -fi - SCRIPT_PATH=$(realpath "$0") SCRIPT_DIR=$(dirname "$SCRIPT_PATH") ROOT_DIR=$(realpath "$SCRIPT_DIR/..") -echo "SCRIPT_PATH: $SCRIPT_PATH" -echo "ROOT_DIR: $ROOT_DIR" -echo "SCRIPT_DIR: $SCRIPT_DIR" - -which swiftlint -which gxargs - -git diff --name-status origin/main \ -| grep -E "^A|^M" | sed "s/^[AM]\t//g" \ -| grep -E "\.swift\$$" \ -| gxargs -I '{}' -d '\n' --no-run-if-empty swiftlint --config $ROOT_DIR/.swiftlint.yml --reporter xcode $ROOT_DIR/{} +swiftlint --config $ROOT_DIR/.swiftlint.yml --reporter xcode