Last active
September 9, 2019 00:46
-
-
Save shakemno/c66ae6e959fad82300c662120b700326 to your computer and use it in GitHub Desktop.
XCode build phase script to never miss any 'force' Quick or Nimble test
This file contains hidden or 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
| TAGS="TODO:|FIXME:" | |
| ERRORTAG="ERROR:" | |
| HELPERS="fdescribe|fcontext|fit" | |
| VIOLATIONS=$(find "${SRCROOT}" "./SUBDIRA" "./SUBDIRB" \ | |
| \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number \ | |
| --only-matching "($TAGS).*\$|($ERRORTAG).*|($HELPERS).*\$" |\ | |
| perl -p -e "s/($TAGS)/ warning: \$1/" |\ | |
| perl -p -e "s/($ERRORTAG)/ error: \$1/" |\ | |
| perl -p -e "s/($HELPERS)/ error: \$1/") | |
| if [ -n "$VIOLATIONS" ]; | |
| then | |
| echo "error: $VIOLATIONS"; exit 1 | |
| else | |
| exit 0 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment