我正在尝试从OCLint分析中生成一个html报告。我已经安装了xctool并使用以下命令生成了json文件:
xctool -project demoProject.xcodeproj -scheme demoProject -sdk iphonesimulator -reporter json-compilation-database:compile_commands.json build现在,我可以使用以下命令运行分析:
oclint-json-compilation-database但报告是在标准输出上打印的。
OCLint脚本有一个报表类型参数,因此我可以使用以下命令创建一个html报表:
oclint -report-type html -o report.html 但是我不能用oclin-json-compilation-database做到这一点。
我阅读了帮助页面(http://docs.oclint.org/en/dev/manual/oclint-json-compilation-database.html),发现了一个oclint_args参数,但我不知道如何使用它。我试过了
oclint-json-compilation-database -v oclint_args report-type html o report.html但是什么也没发生
发布于 2013-12-20 19:17:53
我找到了!只需传递所有双引号的参数
oclint-json-compilation-database -v oclint_args "-report-type html -o report.html"发布于 2014-06-19 09:08:44
另一种方法是:
oclint-json-compilation-database -v -- -report-type html -o report.html一个更复杂的示例可能如下所示:
oclint-json-compilation-database -e exclude_this_folder* -e exclude_that_folder* -- \
-report-type html -o report.html -max-priority-2=15 -max-priority-3=30 \
-rc CYCLOMATIC_COMPLEXITY=4 -rc LONG_CLASS=200 -rc LONG_LINE=120 \
-rc LONG_METHOD=10 -rc NPATH_COMPLEXITY=20 -rc NESTED_BLOCK_DEPTH=3 \
-rc TOO_MANY_PARAMETERS=5 -rc LONG_VARIABLE_NAME=30https://stackoverflow.com/questions/20702432
复制相似问题