2012-03-16 56 views
-1

我指定給Metrical,我們需要運行rcov,roody,reek,stat,flog,flay。 它看起來像在運行所有度量標準後,在生成報告時會停滯不前。當我按Ctrl + C中止測量時,它會打印出下面的堆棧跟蹤。當通過Jenkins運行時,測量掛起

/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 

請大家幫忙。提前致謝。

+0

指標適用於您的開發環境? – shingara 2012-03-16 09:33:25

回答

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 
+1

metric_fu 3.0現在已經出來了,而且很少有bug(我是維護者)。 https://github.com/metricfu/metric_fu你用什麼在jenkins上運行metric_fu? (度量不再需要) – BF4 2013-02-12 02:02:50

相關問題