Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/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