Skip to content

Instantly share code, notes, and snippets.

@vlaskos
vlaskos / xcode-todo-fixme-as-warning.sh
Created November 29, 2017 13:10 — forked from codelahoma/xcode-todo-fixme-as-warning.sh
Highlight TODO and FIXME as warnings in Xcode 8 (add as script build phase)
TAGS="TODO:|FIXME:"
SKIPDIRS="/Carthage"
find "${SRCROOT}/" -type f \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 \
| xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" \
| grep -v "$SKIPDIRS" \
| perl -p -e "s/($TAGS)/ warning: \$1/"