Skip to content

Commit fe3a418

Browse files
committed
Update SwiftLint script
1 parent 9d23909 commit fe3a418

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

QuickTableViewController.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@
922922
);
923923
runOnlyForDeploymentPostprocessing = 0;
924924
shellPath = /bin/sh;
925-
shellScript = "";
925+
shellScript = "sh scripts/swiftlint.sh\n";
926926
};
927927
B51F21BB1F417269009BC2C9 /* SwiftLint */ = {
928928
isa = PBXShellScriptBuildPhase;
@@ -936,7 +936,7 @@
936936
);
937937
runOnlyForDeploymentPostprocessing = 0;
938938
shellPath = /bin/sh;
939-
shellScript = "";
939+
shellScript = "sh scripts/swiftlint.sh\n";
940940
};
941941
B54582FB212D7F89004376C8 /* SwiftLint */ = {
942942
isa = PBXShellScriptBuildPhase;
@@ -950,7 +950,7 @@
950950
);
951951
runOnlyForDeploymentPostprocessing = 0;
952952
shellPath = /bin/sh;
953-
shellScript = "";
953+
shellScript = "sh scripts/swiftlint.sh\n";
954954
};
955955
B5C335A91D07CBD000C706A4 /* Swift Lint */ = {
956956
isa = PBXShellScriptBuildPhase;
@@ -964,7 +964,7 @@
964964
);
965965
runOnlyForDeploymentPostprocessing = 0;
966966
shellPath = /bin/sh;
967-
shellScript = "";
967+
shellScript = "sh scripts/swiftlint.sh\n";
968968
};
969969
/* End PBXShellScriptBuildPhase section */
970970

scripts/swiftlint.rb

Lines changed: 0 additions & 9 deletions
This file was deleted.

scripts/swiftlint.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
export PATH="$PATH:/opt/homebrew/bin"
4+
5+
if [ -n "$CI" ]; then
6+
echo "CI=$CI, skip SwiftLint"
7+
elif which mint > /dev/null; then
8+
mint run realm/SwiftLint --fix && mint run realm/SwiftLint
9+
else
10+
echo "Install 'mint' (https://github.com/yonaskolb/Mint) to run SwiftLint"
11+
fi

0 commit comments

Comments
 (0)