gpt4 book ai didi

ruby - RCov 不起作用

转载 作者:太空宇宙 更新时间:2023-11-03 16:58:44 25 4
gpt4 key购买 nike

我目前正在开发 Ruby gem 并想创建指标。

我正在使用“metric_fu”,但 RCov 似乎不符合我的规范。

这是我的 metric_fu 配置:

MetricFu::Configuration.run do |config|
config.metrics = [:churn, :saikuro, :flog, :flay, :reek, :roodi, :rcov]
config.graphs = [:flog, :flay, :reek, :roodi, :rcov]
config.flay = { :dirs_to_flay => ['lib'] }
config.flog = { :dirs_to_flog => ['lib'] }
config.reek = { :dirs_to_reek => ['lib'] }
config.roodi = { :dirs_to_roodi => ['lib'] }
config.saikuro = { :output_directory => 'scratch_directory/saikuro',
:input_directory => ['lib'],
:cyclo => "",
:filter_cyclo => "0",
:warn_cyclo => "5",
:error_cyclo => "7",
:formater => "text"} #this needs to be set to "text"
config.churn = { :start_date => "1 year ago", :minimum_churn_count => 10}
config.rcov = { :test_files => ["spec/**/*_spec.rb"],
:rcov_opts => ["--sort coverage",
"--no-html",
"--text-coverage",
"--no-color",
"--profile",
"--spec-only",
"--exclude /gems/,/Library/,spec"]}
end

你有什么建议吗?

最好的问候

最佳答案

好吧,如果没有堆栈跟踪,这将很难诊断,但我建议将您的配置更改为:

MetricFu::Configuration.run do |config|
config.metrics = [:rcov]
config.graphs = [:rcov]
config.rcov = { :test_files => ["spec/**/*_spec.rb"],
:rcov_opts => ["--sort coverage",
"--no-html",
"--text-coverage",
"--no-color",
"--profile",
"--spec-only",
"--exclude /gems/,/Library/,spec"]}
end

因此您可以隔离问题。然后运行“rake metrics:all --trace”,如果您无法从那里弄清楚,请在此处或 metric_fu google 组发布结果:http://groups.google.com/group/metric_fu

您也可以尝试直接从命令行运行 rcov(这实际上就是 metric_fu 所做的)。

希望对您有所帮助。

关于ruby - RCov 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1927527/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com