Skip to content

Instantly share code, notes, and snippets.

@paulofierro
Last active June 28, 2016 17:58
Show Gist options
  • Save paulofierro/9235294 to your computer and use it in GitHub Desktop.
Save paulofierro/9235294 to your computer and use it in GitHub Desktop.
Turns // TODO: and // FIXME: into warnings when added as a build phase to an Xcode project.
#!/bin/sh
KEYWORDS="TODO:|VERIFY:|FIXME:|\?\?\?:|\!\!\!:"
find "${SRCROOT}" -not -path "${SRCROOT}/Pods/*" \( -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