Created
February 7, 2010 08:47
-
-
Save EvanBurchard/297315 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
***lib/tasks/metrics*** | |
begin | |
require 'metric_fu' | |
MetricFu::Configuration.run do |config| | |
config.metrics = [:flog] | |
config.flog = { :dirs_to_flog => ['app'] } | |
end | |
rescue LoadError | |
end | |
MetricFu::Configuration.run do |config| | |
config.metrics = [:churn, :saikuro, :stats, :flog, :flay, :reek, :roodi, :rcov] | |
config.graphs = [:flog, :flay, :reek, :roodi, :rcov] | |
config.flay = { :dirs_to_flay => ['app', 'lib', 'script'] } | |
config.flog = { :dirs_to_flog => ['app', 'lib', 'script'] } | |
config.reek = { :dirs_to_reek => ['app', 'lib', 'script'] } | |
config.roodi = { :dirs_to_roodi => ['app', 'lib', 'script'] } | |
config.saikuro = { :output_directory => 'tmp/metric_fu/scratch/saikuro', | |
:input_directory => ['app', 'lib', 'script'], | |
: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 => ['test/**/*_test.rb', | |
'spec/**/*_spec.rb'], | |
:rcov_opts => ["--sort coverage", | |
"--no-html", | |
"--text-coverage", | |
"--no-color", | |
"--profile", | |
"--rails", | |
"--exclude /gems/,/Library/,spec"]} | |
config.rcov[:rcov_opts] << "-Itest" | |
end | |
***If using the new gem version, add this patch to your gem at /gems/jscruggs-metric_fu-1.1.5/lib/generators/reek.rb*** | |
http://github.com/jscruggs/metric_fu/commit/f3a86bcdf60d59efe4c0b90f7abc1e289425c976 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment