oclint: error: no rule loaded

和自甴很熟 提交于 2019-12-11 10:16:40

问题


I am trying to get the list of warnings,errors,syntax coding convention and cyclomatic complexity from command line. I found that oclint can be used for my purpose. but then I ran into a problem

What I tried to do.

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

till here everything went fine and even compile_commands.json was created correctly.

but when I ran oclint-json-compilation-database then I am getting this error.

I read from here that i must use oclint [-enable-clang-static-analyzer] after the above command succeeds

If anyone knows how to solve this or have a better solution for my requirement Please let me know

EDIT: if I use clint [-enable-clang-static-analyzer -R /usr/lib/oclint/rules ] then I am getting the error oclint: error: cannot find dynamic library for report type: text


回答1:


Found my problem. posting the solution as it can help some one.

My problem is, i cloned the repository and pasted the script files in usr/local/lib manually and that somehow is not right!. what I did is removed those and did a brew install.

here is the command

brew install https://raw.github.com/ryuichisaito6/homebrew/f12a21dd274899ef9ab14cd97e45f315dd982cf6/Library/Formula/oclint.rb 

Thanks



来源:https://stackoverflow.com/questions/25763974/oclint-error-no-rule-loaded

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!