Skip to content

Instantly share code, notes, and snippets.

@Chrisb616
Created October 3, 2016 18:28
Show Gist options
  • Save Chrisb616/f15fc13722e92604072dc8de9eaea344 to your computer and use it in GitHub Desktop.
Save Chrisb616/f15fc13722e92604072dc8de9eaea344 to your computer and use it in GitHub Desktop.
Catch Warning and Error Comments During Build
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