Skip to content

Instantly share code, notes, and snippets.

@kreeger
Created December 23, 2015 13:34
Show Gist options
  • Select an option

  • Save kreeger/e59b9a26e42b5dfd09df to your computer and use it in GitHub Desktop.

Select an option

Save kreeger/e59b9a26e42b5dfd09df to your computer and use it in GitHub Desktop.
Add as a build script phase to your Xcode project and it will raise all TODO and FIXME comments as warnings. Original source: http://jeffreysambells.com/2013/01/31/generate-xcode-warnings-from-todo-comments
TAGS="TODO:|FIXME:"
echo "searching ${SRCROOT} for ${TAGS}"
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment