Skip to content

Instantly share code, notes, and snippets.

@ethanliu
Created June 1, 2016 10:47
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 ethanliu/93c1cfb1c9c334edc554150f4640b76c to your computer and use it in GitHub Desktop.
Save ethanliu/93c1cfb1c9c334edc554150f4640b76c to your computer and use it in GitHub Desktop.
Xcode Build Script - Mark TODO, FIXME as waring
KEYWORDS="TODO|FIXME|\?\?\?:|\!\!\!:"
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | \
xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | \
perl -p -e "s/($KEYWORDS)/ warning: \$1/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment