Skip to content

Instantly share code, notes, and snippets.

@jalakoo
Last active March 7, 2018 07:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jalakoo/2d8c578b3b9d0cb4527f66b9963b6a40 to your computer and use it in GitHub Desktop.
Save jalakoo/2d8c578b3b9d0cb4527f66b9963b6a40 to your computer and use it in GitHub Desktop.
Run script that will mark TODO/FIXME/WARNINGs as compiler warnings.
// Add this to a new run script in a target:Build Phases tab
TAGS="TODO:|FIXME:|WARNING:"
echo "searching ${SRCROOT} for ${TAGS}"
find "${SRCROOT}" \( -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