Skip to content

Instantly share code, notes, and snippets.

@bananafish911
Created January 29, 2017 17:15
Show Gist options
  • Save bananafish911/07c8c9d7ed4374d6604eb354a2bba5a8 to your computer and use it in GitHub Desktop.
Save bananafish911/07c8c9d7ed4374d6604eb354a2bba5a8 to your computer and use it in GitHub Desktop.
highlight Swift macro TODO/FIXME as warning
# more info: http://stackoverflow.com/questions/24183812/swift-warning-equivalent
TAGS="TODO:|FIXME:"
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