我正在尝试从命令行获取警告、错误、语法编码约定和圈复杂度的列表。我发现oclin可以用于我的目的。但后来我遇到了一个问题
我想做的。
xcodebuild -project testing.xcodeproj -target "testing" -configuration "Debug" -destination "platform=iOS Simulator,name=iPad" -sdk "iphonesimulator7.0" -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=8 clean
xcodebuild -project testing.xcodeproj -target "testing" -configuration "Debug" -destination "platform=iOS Simulator,name=iPad" -sdk "iphonesimulator7.0" -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=8 build |tee xcodebuild.log
ocint xcodebuild xcodebuild.log
在此之前,一切都很顺利,甚至compilecommands.json都被正确创建。
但当我跑的时候
oclint-json-compilation-database
那么我就得到了这个错误。
我从
here
我必须使用
oclint [-enable-clang-static-analyzer]
在上述命令成功后
如果有人知道如何解决这个问题,或者有更好的解决方案来满足我的要求,请告诉我
编辑:
如果我使用
clint [-enable-clang-static-analyzer -R /usr/lib/oclint/rules ]
那我就错了
oclint: error: cannot find dynamic library for report type: text