Skip to content

Instantly share code, notes, and snippets.

@theangelperalta
Created April 21, 2019 15:06
Show Gist options
  • Save theangelperalta/710284104c56f0f4174368185b213936 to your computer and use it in GitHub Desktop.
Save theangelperalta/710284104c56f0f4174368185b213936 to your computer and use it in GitHub Desktop.
Warnings and Errors - TODO: | FIXME: XCode - Add to build phases
# https://medium.com/@cboynton/todo-make-your-notes-on-xcode-stand-out-5f5124ec064c
TAGS="TODO:|FIXME:"
ERRORTAG="ERROR:"
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$|($ERRORTAG).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/" | perl -p -e "s/($ERRORTAG)/ error: \$1/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment