Skip to content

Instantly share code, notes, and snippets.

View Chrisb616's full-sized avatar

Christopher Boynton Chrisb616

View GitHub Profile
@Chrisb616
Chrisb616 / catchWarningsAndErrors.sh
Created October 3, 2016 18:28
Catch Warning and Error Comments During Build
TAGS="TODO:|FIXME:"
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/"