Skip to content

Instantly share code, notes, and snippets.

@arkilis
Created October 16, 2020 21:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save arkilis/b4281ed869de77dead68d2489c2369ce to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
git diff --diff-filter=d --staged --name-only | grep -e '\(.*\).swift$' | while read line; do
swiftformat "${line}";
git add "$line";
done
swiftlint --quiet --strict
git diff --diff-filter=d --staged --name-only | grep -e '\(.*\).pbxproj$' | while read line; do
sort-xcode-project-file "${line}";
git add "$line";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment