OCLint在html报告文件中出现编译错误,但我的项目建立成功。为什么

时间:2018-05-30 12:56:58

标签: objective-c static-analysis lint oclint oclint-json-compilation

the html report result generated by oclint

xcodebuild -workspace ${myworkspace} -scheme ${myscheme} \ -sdk iphonesimulator \ -derivedDataPath ./build/derivedData \ -configuration Debug \ COMPILER_INDEX_STORE_ENABLE=NO \ | xcpretty -r json-compilation-database -o compile_commands.json

我运行上面的命令行来构建我的项目,它构建成功,但是当我运行下面的命令行生成oclint html报告文件时,得到15个编译器错误。

oclint-json-compilation-database -e Pods -- \ -extra-arg=-Wno-error=everything \ -report-type html \ -rc LONG_LINE=200 \ -rule MultipleUnaryOperator \ -max-priority-1=0 \ -max-priority-2=10 \ -max-priority-3=20 \ -o ./oclint_report.html

1 个答案:

答案 0 :(得分:0)

尝试

oclint-json-compilation-database <YOUR OPTIONS HERE> -- -extra-arg=-Wno-everything

为:

oclint-json-compilation-database -e Pods -- \
               -extra-arg=-Wno-error=everything \
               -report-type html \
               -rc LONG_LINE=200 \
               -rule MultipleUnaryOperator \
               -max-priority-1=0 \
               -max-priority-2=10 \
               -max-priority-3=20 \
               -extra-arg=-Wno-everything \
               -o ./oclint_report.html