安装
brew cask install oclint
分析项目
oclint-json-compilation-database -e Pods -- -report-type html -o oclintresult.html -rc LONG_LINE=9999 -max-priority-1=9999 -max-priority-2=9999 -max-priority-3=9999
报错及解决
1、multiple jobs问题
oclint: error: one compiler command contains multiple jobs:xxxx
基本出现在初次运行oclint或者使用了clean命令,清除了编译缓存之后,会出现下面的错误:
找到了一种解决方式:oclint: error: one compiler command contains multiple jobs解决方式
(更多依赖内容参考OCLint-内容扩展页面)
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['COMPILER_INDEX_STORE_ENABLE'] = "NO"
end
end
end