Skip to content

Instantly share code, notes, and snippets.

@sourleangchhean168
Created May 12, 2017 06:43
Show Gist options
  • Save sourleangchhean168/616161cf4e3ec1334ba7f7dcea89e4db to your computer and use it in GitHub Desktop.
Save sourleangchhean168/616161cf4e3ec1334ba7f7dcea89e4db to your computer and use it in GitHub Desktop.
Show Warning to remind you to modify later in Xcode
TAGS="TODO:|FIXME:"
ERRORTAG="DANGER:|ERROR:"
find "${SRCROOT}" \( -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/"
#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