Skip to content

Instantly share code, notes, and snippets.

@vlaskos
Created February 28, 2018 11:05
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 vlaskos/fcff0e9d1701ed8be620e1a74b07d62b to your computer and use it in GitHub Desktop.
Save vlaskos/fcff0e9d1701ed8be620e1a74b07d62b to your computer and use it in GitHub Desktop.
warnings in swift
TAGS="TODO:|FIXME:|WARNING:"
ERRORTAG="ERROR:"
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$|($ERRORTAG).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/"| perl -p -e "s/($ERRORTAG)/ error: \$1/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment