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
最佳答案
尝试这个
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
关于objective-c - OCLint在html报表文件中出现编译错误,但是我的项目构建成功。为什么,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/50605332/