-1

我向 Metrical 指定我们需要运行 rcov、roody、reek、stat、flog、flay。看起来在运行所有指标后,它在生成报告时卡住了。当我按 Ctrl+C 中止度量时,它会在堆栈跟踪之后打印出来。

/home/deploy/.gem/ruby/1.8/gems/syntax-1.0.0/lib/syntax/common.rb:99:in `scan_until': Interrupt
from /home/deploy/.gem/ruby/1.8/gems/syntax-1.0.0/lib/syntax/common.rb:99:in `__send__'
from /home/deploy/.gem/ruby/1.8/gems/syntax-1.0.0/lib/syntax/common.rb:99:in `scan_until'
from /home/deploy/.gem/ruby/1.8/gems/syntax-1.0.0/lib/syntax/lang/ruby.rb:28:in `step'
from /home/deploy/.gem/ruby/1.8/gems/syntax-1.0.0/lib/syntax/common.rb:77:in `tokenize'
from /home/deploy/.gem/ruby/1.8/gems/syntax-1.0.0/lib/syntax/convertors/html.rb:16:in `convert'
from /home/deploy/.gem/ruby/1.8/gems/metric_fu-2.1.1/lib/templates/awesome/awesome_template.rb:59:in `write_file_data'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `each_with_index'
from /home/deploy/.gem/ruby/1.8/gems/metric_fu-2.1.1/lib/templates/awesome/awesome_template.rb:46:in `each'
from /home/deploy/.gem/ruby/1.8/gems/metric_fu-2.1.1/lib/templates/awesome/awesome_template.rb:46:in `each_with_index'
from /home/deploy/.gem/ruby/1.8/gems/metric_fu-2.1.1/lib/templates/awesome/awesome_template.rb:46:in `write_file_data'
from /home/deploy/.gem/ruby/1.8/gems/metric_fu-2.1.1/lib/templates/awesome/awesome_template.rb:40:in `each_pair'
from /home/deploy/.gem/ruby/1.8/gems/metric_fu-2.1.1/lib/templates/awesome/awesome_template.rb:40:in `write_file_data'
from /home/deploy/.gem/ruby/1.8/gems/metric_fu-2.1.1/lib/templates/awesome/awesome_template.rb:34:in `write'
from /home/deploy/.gem/ruby/1.8/gems/metric_fu-2.1.1/lib/base/report.rb:48:in `save_templatized_report'
from /usr/lib/ruby/gems/1.8/gems/metrical-0.1.0/lib/metrical.rb:66:in `run_metric_fu'
from /usr/lib/ruby/gems/1.8/gems/metrical-0.1.0/lib/metrical.rb:21:in `run'
from /usr/lib/ruby/gems/1.8/gems/metrical-0.1.0/bin/metrical:4
from /usr/bin/metrical:19:in `load'
from /usr/bin/metrical:19

请帮忙。提前致谢。

4

1 回答 1

0

以下度量的配置解决了我的问题。本质上,我将模板更改为不是默认的 StandardTemplate 并且它可以工作。至少它不会因为任何原因挂起。

MetricFu::Configuration.run do |config|
config.metrics = [:reek, :roodi, :flog, :flay, :rcov, :stats, :rails_best_practices, :churn, :saikuro]
config.graphs = [:reek, :roodi, :flog, :flay, :rcov, :stats, :rails_best_practices, :churn, :saikuro]
config.verbose = true
config.template_class = StandardTemplate
config.rcov[:rcov_opts] << "-I#{"lib:test"}"
config.graph_engine = :gchart
end
于 2012-03-16T14:26:23.287 回答