Skip to content

Instantly share code, notes, and snippets.

@jawwad
Created June 24, 2015 13:22
Show Gist options
  • Save jawwad/43002afe74fc74d2e9f5 to your computer and use it in GitHub Desktop.
Save jawwad/43002afe74fc74d2e9f5 to your computer and use it in GitHub Desktop.
Xcode Build Phase Run script
SCRIPT_LOCATION='/usr/local/bin/swiftlint'
VIOLATIONS_TO_IGNORE="\
Length|\
Force Cast|\
Name Format|\
TODO or FIXME"
if [ -e $SCRIPT_LOCATION ] ; then
$SCRIPT_LOCATION | grep -Ev "($VIOLATIONS_TO_IGNORE) Violation"
else
echo "error: $SCRIPT_LOCATION not found. Please run: brew update && brew install swiftlint"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment