OCLint 生成 html 报告错误

标签 oclint

我正在尝试从 OCLint 生成 html 报告分析。我已经安装 xctool并生成 json文件与此命令:

xcodebuild -workspace SecondHand.xcworkspace  -scheme SecondHand -sdk iphonesimulator  build | tee xcodebuild.log | xcpretty -r json-compilation-database --output compile_commands.json

OCLint 脚本有一个报告类型参数,所以我可以用这个命令创建一个 html 报告:
oclint-json-compilation-database -- -max-priority-1 10000 -max-priority-2 10000 -max-priority-3 10000 -rc LONG_LINE=150 -report-type pmd -o oclint.xml

但是这里命令出错:
localhost:SecondHand liyaowei$ oclint-json-compilation-database -- -max-priority-1 10000 -max-priority-2 10000 -max-priority-3 10000 -rc LONG_LINE=150 -report-type pmd -o oclint.xml
1 error generated.
1 error generated.

oclint:错误:无法打开报告输出文件:oclint: error: cannot open report output file /Users/liyaowei/Desktop/ffstpcommon_V1.6.0/SecondHand/oclint.xml

最佳答案

它迟到了,但对于那些提到这个问题的人,请使用 -report-type xml

关于OCLint 生成 html 报告错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43628297/

相关文章:

xcode - 在当前位置找不到 oclintcompile_commands.json

objective-c - 如何将 OCLint 用于 Cocoa 框架?

xcode - OCLint 无法发现预编译的工作区/项目头

json - oclint:错误:违规行为超过 Jenkins 的阈值

iOS : OCLint is not working with xcode 9. 2

clang - 从 ObjCPropertyDecl 获取类信息

c++ - 如何比较 clang 中的两个源位置?