Skip to content

Instantly share code, notes, and snippets.

@miff
Created April 4, 2021 13:07
Show Gist options
  • Select an option

  • Save miff/cd537142635435a8ae88666a000bf3fd to your computer and use it in GitHub Desktop.

Select an option

Save miff/cd537142635435a8ae88666a000bf3fd to your computer and use it in GitHub Desktop.
Build Script in XCode
// In Targets -> Build Phases -> Add Run Script
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/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment