我正在尝试从命令行获取警告、错误、语法编码约定和圈复杂度的列表。我发现 oclint 可以用于我的目的。但后来我遇到了一个问题
我试图做的。
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
oclint-xcodebuild xcodebuild.log
到这里一切都很好,甚至 compile_commands.json 也被正确创建。
但是当我跑步时,我oclint-json-compilation-database
收到了这个错误。
我从这里读到我必须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