1、直接使用
infer --no-xcpretty --keep-going -- xcodebuild -workspace xxxx.xcworkspace -scheme xxxx -configuration Debug -sdk iphonesimulator
2、分三步
第一步:
xcodebuild -workspace xxxx.xcworkspace -scheme xxxx -configuration Debug -sdk iphonesimulator clean build COMPILER_INDEX_STORE_ENABLE=NO | tee xcodebuild.log
第二步:
xcpretty -r json-compilation-database -o compile_commands.json < xcodebuild.log > /dev/null
第三步:
infer run --skip-analysis-in-path Pods --compilation-database-escaped compile_commands.json --keep-going
3、对扫描结果删除无用依赖分析:
sed -e '/Pods/d' bug.txt > a.log