Skip to content

Instantly share code, notes, and snippets.

@tonyarnold
Created November 19, 2011 22:21
Show Gist options
  • Save tonyarnold/1379451 to your computer and use it in GitHub Desktop.
Save tonyarnold/1379451 to your computer and use it in GitHub Desktop.
Xcode build script to highlight TODO/FIXME/???/!!! in build logs, while excluding certain directories
KEYWORDS="TODO:|FIXME:|\?\?\?:|\!\!\!:"
find "${SRCROOT}" \( -path "${SRCROOT}/Vendor" -or -path "${SRCROOT}/.git" \) -prune -o \( -name "*.h" -or -name "*.m" \) -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