Skip to content

Instantly share code, notes, and snippets.

@codelahoma
Created October 15, 2016 19:11
Show Gist options
  • Save codelahoma/715b24e0b6c885fb6629bea46f360188 to your computer and use it in GitHub Desktop.
Save codelahoma/715b24e0b6c885fb6629bea46f360188 to your computer and use it in GitHub Desktop.
Highlight TODO and FIXME as warnings in Xcode 8 (add as script build phase)
TAGS="TODO:|FIXME:"
SKIPDIRS="/Carthage"
find "${SRCROOT}/" -type f \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 \
| xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" \
| grep -v "$SKIPDIRS" \
| perl -p -e "s/($TAGS)/ warning: \$1/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment