Treat TODO: and FIXME: as warnings in Swift project

Create a new Run Script Phase in your target's Build Phase

echo "searching ${SRCROOT} for ${TAGS}"  
find "${SRCROOT}" \( -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/"  

If your code needs commenting, it isn’t clear enough, but TODO: and FIXME: is the exception.

Happy codeing.

comments powered by Disqus