Does Swift have a #warning equivalent? It\'s simply used to show a warning in Xcode\'s own GUI
I\'m also interested in whether there\'s a #error equivalent.
One CocoaPod that I was using had .swift in its name, so a directory was returned, which caused the script by Kyle to crash. Adding -type f to the find command fixes that problem by only looking at files that match *.swift instead of also returning directories that match the pattern.
Final code that I used:
TAGS="TODO:|FIXME:"
echo "searching ${SRCROOT} for ${TAGS}"
find "${SRCROOT}" \( -name "*.swift" \) -type f -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/"