oclint:错误:未加载任何规则 [英] oclint: error: no rule loaded

查看:360
本文介绍了oclint:错误:未加载任何规则的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从命令行获取警告,错误,语法编码约定和循环复杂性的列表.我发现oclint可以用于我的目的.但后来我遇到了问题

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

我试图做的事.

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

oclint-xcodebuild xcodebuild.log

直到这里一切都很好,甚至compile_commands.json都已正确创建.

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

但是当我运行oclint-json-compilation-database时,我得到了这个错误.

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

我从此处读到,我必须在oclint [-enable-clang-static-analyzer]之后使用上面的命令成功

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

如果我使用clint [-enable-clang-static-analyzer -R /usr/lib/oclint/rules ],则会收到错误oclint: error: cannot find dynamic library for report type: text

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

推荐答案

发现了我的问题.发布解决方案,因为它可以帮助一些人.

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

我的问题是,我克隆了存储库,然后将脚本文件手动粘贴到usr/local/lib中,但这不正确!我所做的是删除了这些文件并进行了brew安装.

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.

这是命令

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

谢谢

这篇关于oclint:错误:未加载任何规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆