Skip to content

Instantly share code, notes, and snippets.

@soapyigu
Created February 17, 2018 09:51
Show Gist options
  • Save soapyigu/5fce059ce9a261fdafc41d74974d647f to your computer and use it in GitHub Desktop.
Save soapyigu/5fce059ce9a261fdafc41d74974d647f to your computer and use it in GitHub Desktop.
bash
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