Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vlaskos/840d5a24b9289596ac732404074fc13f to your computer and use it in GitHub Desktop.
Save vlaskos/840d5a24b9289596ac732404074fc13f 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