Skip to content

Instantly share code, notes, and snippets.

@billypchan
Last active March 11, 2020 14:18
Show Gist options
  • Save billypchan/df6abb998ef36c55e35a1a35bd1bfada to your computer and use it in GitHub Desktop.
Save billypchan/df6abb998ef36c55e35a1a35bd1bfada to your computer and use it in GitHub Desktop.
git: compare with delevop branch, then run swiftLint only on changed swift files
## put this file under /usr/local/bin
git diff develop --name-only | while read filename; do
if [[ $filename == *.swift ]]
then
swiftlint autocorrect --path "$filename";
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment