`
chengyuanheng
  • 浏览: 19563 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

install metric_fu

    博客分类:
  • gem
 
阅读更多
metric_fu

Installation

gem install metric_fu

Gem

 

From your Gemfile ,install these gems for test and development environment

group :test ,:development do

gem "metric_fu"

gem 'simplecov'

gem 'simplecov-rcov-text'

gem 'roodi' #these gem ensure that you can run roodi or roodi . in shell

end

Require

 

From your Rakefile

 require 'churn'

Usage

 

From your application root. Running via Rake is still supported.

metric_fu

See:

  • metric_fu --help for more options

Run

run "rake -T", you can see all of Commands that you can use , for example:
rake metrics:all 
rake metrics:cane
rake metrics:churn
rake metrics:flay
rake metrics:flog
rake metrics:hotspots
rake metrics:only
rake metrics:rails_best_practices
rake metrics:reek
rake metrics:roodi
rake metrics:saikuro
rake metrics:stats 
Run these commands , you will get some reports at "server/tmp/metric_fu/output" and yml files at "server/tmp/metric_fu/_data"

In shell 

rspec .
Run the command , you will run all testings include all of engine and get a value about test coverage
 
run other metric_fu features: 
flog feature/ #measuring code complexity
flay feature/ #find duplicate (including copy / paste and structure)
reek .   or   reek features/     #spot code smells
roodi  or  roodi .          #find a large number of general issues
rake churn     #Identifies the file changes too frequently
rails_best_practices .      #code matrix tool
cane             #code quality threshold violation
Extra
    saikuro - cyclomatic complexity measure
    hotspot - hot code analysis

Link

 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics