Last active
March 15, 2022 07:36
-
-
Save andreweades/ab430c4a66a8723601a850cbd9e55214 to your computer and use it in GitHub Desktop.
Xcode Benhavior script to run swiftlint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Written in respond to https://twitter.com/simonbs/status/1437678815866654723 | |
DIR="$(echo "$XcodeProjectPath" | cut -f 1 -d '.')" | |
if which /opt/homebrew/bin/swiftlint >/dev/null; then | |
/opt/homebrew/bin/swiftlint $DIR/Sources > $DIR/lint-log.txt | |
else | |
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment