Skip to content

Instantly share code, notes, and snippets.

@mnaruse
Created June 14, 2020 11:16
Show Gist options
  • Save mnaruse/57ace994ef363780b0b28dd9fb8aee93 to your computer and use it in GitHub Desktop.
Save mnaruse/57ace994ef363780b0b28dd9fb8aee93 to your computer and use it in GitHub Desktop.
if which "${PODS_ROOT}/SwiftLint/swiftlint" >/dev/null; then
git diff --name-only | grep .swift | while read filename; do
"${PODS_ROOT}/SwiftLint/swiftlint" --path "$filename"
done
else
echo "SwiftLint does not exist, 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