Created
May 10, 2011 15:53
-
-
Save yene/964741 to your computer and use it in GitHub Desktop.
pre-commit hook which uses clang static analyter before commit
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/sh | |
RESULT=$(xcodebuild -configuration Debug RUN_CLANG_STATIC_ANALYZER=YES) | |
if `echo ${RESULT} | grep "generated." 1>/dev/null 2>&1` | |
then | |
echo "commit failed: anaylzer error found" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment