Last active
January 27, 2017 18:07
-
-
Save funky-monkey/7d006abc5ad0ec8d71f3 to your computer and use it in GitHub Desktop.
Generate Xcode warnings from TODO's and FIXME's for Swift
This file contains 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
#!/bin/bash | |
# Search all TODO, FIXME, ???, !!! and XXX from .swift files | |
# To install in Xcode and 'Build Phase' and add 'New Run Script Phase' | |
KEYWORDS="TODO:|FIXME:|\?\?\?:|\!\!\!:XXX:" | |
find "${SRCROOT}" \( -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | perl -p -e "s/($KEYWORDS)/ warning: \$1/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment