OCLint - http://oclint.org
OCLint is a static code analysis tool for improving quality and reducing defects by inspecting C, C++ and Objective-C code.
It looks for potential problems that aren't visible to compilers, for example:
- Possible bugs - empty if/else/try/catch/finally statements
- Unused code - unused local variables and parameters
- Complicated code - high cyclomatic complexity, NPath complexity and high NCSS
- Redundant code - redundant if statement and useless parentheses
- Code smells - long method and long parameter list
- Bad practices - inverted logic and parameter reassignment
- ...
For more information, visit http://oclint.org
如果你本地没有CMake
和Ninja
两个编译环境, 并且安装失败或者是CMake
编译阶段频繁失败, 可以使用我提供的编译好的0.15.0
版本
安装工具以和编译阶段需要终端FQ
, 如果只是想尽快解决问题, 不关心操作过程, 那么工具链的安装和工程编译阶段就可以直接跳过了
在feature/0.15.0
的分支下我已经提供了本地编译好的资源文件
默认build
被设置了忽略, 为了更明显的辨认, 我将文件夹名称改为oclint-0.15.0-build
, 名称可以任意修改, 关键是环境路径一定要设置正确.
使用请参考: 修复xcode 11下OCLint分析失败