OCLint没有在运行脚本中运行xcodebuild

时间:2016-11-11 18:01:05

标签: xcode xcodebuild oclint oclint-json-compilation

我一直在尝试将OCLint添加到我的项目中,它主要用于

cd ${SRCROOT}

xcodebuild clean
xcodebuild -target {TARGET} -configuration Debug -scheme {SCHEME} | tee ${TARGET_TEMP_DIR}/xcodebuild.log

cd ${TARGET_TEMP_DIR}
oclint-xcodebuild

cp ${TARGET_TEMP_DIR}/compile_commands.json ${SRCROOT}/compile_commands.json

cd ${TARGET_TEMP_DIR}
oclint-json-compilation-database -e -v -- -report-type xcode

问题是,我不想在运行脚本中调用xcodebuild,并且每当我在xcode中构建项目时都要运行xcodebuild两次。有没有人找到一种方法从xcode的构建命令创建xcodebuild.log文件?

我找到了有关转到DerivedData / {Project} / Logs / Build并解压缩驻留在那里的.xactivitylog文件的信息,但它包含了大量垃圾,使得oclint-xcodebuild命令构建了一个空的compile_commands。 json文件。

0 个答案:

没有答案