Skip to content

Instantly share code, notes, and snippets.

@gdavis
Created March 9, 2016 01:43
Show Gist options
  • Select an option

  • Save gdavis/c51944e256fc4b834d6d to your computer and use it in GitHub Desktop.

Select an option

Save gdavis/c51944e256fc4b834d6d to your computer and use it in GitHub Desktop.
Xcode Run Script that highlights TODO, FIXME and more as warnings.
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/"
@gdavis
Copy link
Author

gdavis commented Mar 9, 2016

Add as a Run Script in Xcode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment