我正在尝试从 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/