OCLint生成空的compile_commands.json

时间:2014-01-27 07:40:53

标签: xcode xcode5 static-analysis lint

我已经在我的mac中成功安装了oclint并尝试运行它, 我按照Here描述的步骤,但在运行OCLint目标时,它在UIKit和CoreFoundation框架中显示了一些错误。

同时显示错误

Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure

然后我尝试this正确生成xcodebuild.log(我认为),但是当我执行oclint-xcodebuild时,它创建的compile_commands.json文件只包含一个空数组。

使用

针对darwin / x86_64的OCLint 0.9 dev构建

Xcode版本5.0(5A1413)

OS X 10.8.5

更新

最后在clean和build之后生成compile_commands.json正确生成,但在框架内部出现了很多错误。如何在不在框架中生成错误的情况下构建它?

另外我怎么能避免

long line P3 Line with 108 characters exceeds limit of 100 

使用OCLint时出现此警告?

1 个答案:

答案 0 :(得分:0)

我认为您需要添加此-rc = LONG_LINE = 300。您可以看到更多示例here

检查:oclint-json-compilation-database -v oclint_args" -report-type html -o report.html -rc = LONG_LINE = 120"打开compile_commands.json打开report.html