Skip to content

Instantly share code, notes, and snippets.

@dominika-czarnecka
Last active April 17, 2018 10:08
Show Gist options
  • Save dominika-czarnecka/56f46045aebbd6042d12eda9acf80e62 to your computer and use it in GitHub Desktop.
Save dominika-czarnecka/56f46045aebbd6042d12eda9acf80e62 to your computer and use it in GitHub Desktop.
#Script to make TODO as Warning
if [ "${CONFIGURATION}" = "Debug" ]
then
#TAGS are keywords to make line as warning
TAGS="TODO:|FIX:"
echo "searching ${SRCROOT} for ${TAGS}"
find "${SRCROOT}" \( -name "*.swift" \) -not -path "./Pods/*" -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment