Created
July 28, 2018 14:28
-
-
Save edwardean/a3310e55ecc941217fe3c7d3e1f86574 to your computer and use it in GitHub Desktop.
xcode-enhancement-scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Under the projects folder -> Build Phases -> click on add new build phase on top left corner -> select New Run Script Phase | |
# Select the Run Script from the dropdown of Build Phase | |
# let the Shell be the default (/bin/sh) | |
# Paste below code in the place provided | |
# This code run every time the project is build | |
# To create warning (TODO, FIXME) & error msgs (ERROR) comment tags | |
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/" | |
# without the EROOR Msgs | |
TAGS="TODO|FIXME" | |
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | \ | |
xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | \ | |
perl -p -e "s/($TAGS)/ warning: \$1/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment