Skip to content

Instantly share code, notes, and snippets.

@lexrus
Last active December 17, 2015 00:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lexrus/5520311 to your computer and use it in GitHub Desktop.
Save lexrus/5520311 to your computer and use it in GitHub Desktop.
Treat // TODO: and // FIXME: as warnings in Xcode.
KEYWORDS="TODO:|FIXME:|\?\?\?:|\!\!\!:"
find "${SRCROOT}" -type f \
\( \
-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