Last active
June 17, 2017 00:22
-
-
Save scottcarter/cdd2f0b4c7412b1924038a7043340d5a to your computer and use it in GitHub Desktop.
Swift Issue generation Build Phase Run Script
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
# Copied and modified from: | |
# https://littlebitesofcocoa.com/207-annotating-swift-with-marks-todo-s-and-fixme-s | |
# | |
# Modification is to require a comment to immediately preceed the keyword, so that the keyword can be used elsewhere in code. | |
# | |
KEYWORDS="INFO|TODO|FIXME|\?\?\?:|\!\!\!:" | |
find "${SRCROOT}" \( -name "*.swift" \) -print0 | \ | |
xargs -0 egrep --with-filename --line-number --only-matching "//\s*($KEYWORDS).*\$" | \ | |
perl -p -e "s/\/\/\s*($KEYWORDS)/ warning: \$1/" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment