Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 1.15 KB

warning.md

File metadata and controls

57 lines (38 loc) · 1.15 KB

Xcode 警告信息

Xcode 编译警告设置

Build Settings > Apple LLVM [Version] - Warning ***** 配置警告设置,Quick Help查看每个设置的帮助。

Reference

#pragma message

预处理指令

不支持中文,在issue navagitor中提示

#pragma message("<TODO> to do")
#pragma message("<FIXME> fix me")
#pragma message("<???> do not known")
#pragma message("<!!!> important")

#warning

#pragma message

#warning <TODO> to do

注释

支持中文,在Symbols list中显示

// TODO:
// FIXME:
// !!!:
// ???:

Build Phases 添加 run script

KEYWORDS="TODO|FIXME|\?\?\?:|\!\!\!:"
find . -name *.[h,m] ! -path "./Pods/*" ! -path "./Example/*" | xargs egrep --with-filename --line-number --only-matching ${KEYWORDS} | perl -p -e "s/($KEYWORDS)/ warning: \$1/"

所有变成warning

相关资料