Swift 使用 #warning

來源:互聯網
上載者:User

標籤:run   shu   package   arch   ack   roo   grep   strip   rgs   

swift 中沒法使用#Warning來提示警告, 可以通過給TODO: FIXME:加上警告, 實作類別似的效果.

Build Phases ---> Run Script ---> add a new Build Phases ---> new run script phase

TAGS="TODO:|FIXME:"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/"

:


 




Swift 使用 #warning

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.