一、安装
brew tap oclint/formulae
brew install oclint
二、使用 在项目文件目录下
oclint -report-type html -o AddNotesViewController-report.html AddNotesViewController.m
三、结果分析
OCLint Report
Summary
| Total Files | Files with Violations | Priority 1 | Priority 2 | Priority 3 | Compiler Errors | Compiler Warnings | Clang Static Analyzer |
|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
Details
| File | Location | Rule Name | Rule Category | Priority | Message |
|---|---|---|---|---|---|
| /Users/maochengfang/Documents/CRZY/CRZY/Pages/Cums/AddNotesViewController.h | 8:9 | compiler error | error | 'CRZYBaseViewContrl.h' file not found |
Wed May 12 17:53:04 2021 | Generated with OCLint v20.11.
本文介绍如何使用OCLint进行Objective-C项目的静态代码分析。通过安装配置OCLint,针对具体项目文件进行分析,并生成详细的HTML报告。报告中详细列出了编译错误及各类优先级的问题。
4554

被折叠的 条评论
为什么被折叠?



