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目录。

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容