Skip to content

Instantly share code, notes, and snippets.

@stucarney
Created January 18, 2017 18:35
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 stucarney/ace76db5fda9415f98855134c3a5a480 to your computer and use it in GitHub Desktop.
Save stucarney/ace76db5fda9415f98855134c3a5a480 to your computer and use it in GitHub Desktop.
Xcode / Swift - Run Script to highlight (warn) for any TODO: or FIXME: comments
TAGS="TODO:|FIXME:"
echo "searching ${SRCROOT} for ${TAGS}"
find "${SRCROOT}" \( -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | 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