我想從命令行得到警告,錯誤,語法編碼約定和圈複雜度的列表。我發現oclint可以用於我的目的。但後來我遇到了問題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
時,我得到這個錯誤。
我從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
嘗試0.9,因爲它是bug更少 – 2014-09-12 08:15:02