Skip to content

Instantly share code, notes, and snippets.

@joe-scotto
Last active July 16, 2022 22:48
Show Gist options
  • Save joe-scotto/99d46d1d8309e514de9a2804bc205323 to your computer and use it in GitHub Desktop.
Save joe-scotto/99d46d1d8309e514de9a2804bc205323 to your computer and use it in GitHub Desktop.
Run Script for Xcode to detect TODO: and FIXME: comments.
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/"
@joe-scotto
Copy link
Author

Screen Shot 2022-07-16 at 6 48 38 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment