Oclint 到底怎么用?clang 里面如何用?市面有哪些?

一、跟着文章理解一下https://blog.csdn.net/weixin_36139431/article/details/81560702

二、使用

xcodebuild编译输出为xcodebuild.log,并且利用xcodebuild.log和xcpretty工具生成了名为compilation_db.json的json格式文件,该文件应该包含了多组内容,其中的key分别为directory、command、file,注意此文件不应该为空。compilation_db.json文件的位置为build/reports/compilation_db.json;

xcodebuild -workspace ShopBranch.xcworkspace

- scheme ShopBranch clean build | tee

- xcodebuild.log | xcpretty --report json-

- compilation-databasench clean build | tee

- xcodebuild.log

将build/reports/compilation_db.json拷贝到工程目录下,重命名为compile_commands.json;

mv build/reports/compilation_db.json

compile_commands.json

执行扫描,并且输出报告,注意这一步花费的时间会比较久;

oclint-json-compilation-database -e Pods

-v -- -report-type html -o report.html

-max-priority-1=9999 -max-priority-2=9999

-max-priority-3=9999


三、没有exclude掉pods目录。

你可能感兴趣的:(Oclint 到底怎么用?clang 里面如何用?市面有哪些?)