Xcode using FIXME, TODO, ???,?

前端 未结 9 1314
抹茶落季
抹茶落季 2021-01-30 04:13

I have started to use the FIXME, TODO, ??? and !!! tags in XCode but have am finding it painful that it does not recognise th

9条回答
  •  悲哀的现实
    2021-01-30 05:01

    This is the script I use as an added build phase, note it excludes files pulled-in via Carthage (very annoying to get these as well otherwise since its not 'your' code) :

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

    Works well on xCode 9.3 with Swift 4

提交回复
热议问题