Last active
October 2, 2019 20:07
-
-
Save cobbal/5ea150749b8fcadece1ee7b698b8b7a2 to your computer and use it in GitHub Desktop.
swift lint before commit, put in ".git/hooks/pre-commit", then chmod +x it
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/zsh | |
set -euo pipefail | |
if xcbeautify --version 2>/dev/null >/dev/null; then | |
./scripts/runSwiftLint.sh 2>&1 | xcbeautify | |
else | |
./scripts/runSwiftLint.sh 2>&1 | tail -n 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment