Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignoring files in simplecov #257

Open
chrisandrewcl opened this issue Apr 12, 2015 · 4 comments
Open

Ignoring files in simplecov #257

chrisandrewcl opened this issue Apr 12, 2015 · 4 comments
Assignees

Comments

@chrisandrewcl
Copy link

While we cannot ignore files via a global config in metric_fu, I am trying to config each metric individually.

Starting by simplecov, the bellow example isn't working.

spec_helper.rb

    require 'simplecov'
    require 'metric_fu/metrics/rcov/simplecov_formatter'
    SimpleCov.formatter = SimpleCov::Formatter::MetricFu

    SimpleCov.start 'rails' do
      add_filter '/spec/'
      add_filter '/config/'
      add_filter '/lib/'
      add_filter '/vendor/'
    end

I am still getting these on my reports:

File Path Percent run
./config/initializers/mime_types.rb 0
... ...
./lib/no_fuzz/no_fuzz.rb 0
... ...

Am I doing something wrong or could be a issue in the integration between simplecov and metric_fu?

@bf4 bf4 self-assigned this Apr 12, 2015
@bf4
Copy link
Member

bf4 commented May 17, 2015

What's your version of simplecov, and metric_fu, and what's the output of SimpleCov.root if you output it before your simplecov.start and also SimpleCov.at_exit { puts "SimpleCov.root #{SimpleCov.root}" } and the output of metric_fu --debug-info?

@chrisandrewcl
Copy link
Author

Here is what we got:

SimpleCov.root /home/giovane/workspace/produtox_codigo-fonte
(our project root)

metric_fu --debug-info
{"Ruby"=>
{"Engine"=>"ruby",
"Version"=>"2.1.5",
"Patchlevel"=>273,
"Ripper Support"=>true,
"Rubygems Version"=>"2.4.3",
"Long Description"=>
"ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]"},
"Environment"=>
{"VERBOSE"=>"false",
"External Encoding"=>"UTF-8",
"Internal Encoding"=>"",
"Host Architecture"=>"x86_64-unknown-linux-gnu",
"Ruby Prefix"=>"/home/giovane/.rvm/rubies/ruby-2.1.5",
"Ruby Options"=>"RUBYOPT=-rbundler/setup"},
"MetricFu"=>
{"Version"=>"4.11.4",
"Verbose Mode"=>false,
"Enabled Metrics"=>
[:cane,
:rcov,
:flay,
:roodi,
:reek,
:churn,
:rails_best_practices,
:stats,
:hotspots],
"Dependencies"=>
[{"name"=>"flay", "version"=>[">= 2.0.1", "> 2.1"]},
{"name"=>"churn", "version"=>["
> 0.0.35"]},
{"name"=>"flog", "version"=>[">= 4.1.1", "> 4.1"]},
{"name"=>"reek", "version"=>[">= 1.3.4", "
> 1.3"]},
{"name"=>"cane", "version"=>[">= 2.5.2", "> 2.5"]},
{"name"=>"rails_best_practices", "version"=>[">= 1.14.3", "
> 1.14"]},
{"name"=>"saikuro", "version"=>[">= 1.1.3", "> 1.1"]},
{"name"=>"roodi", "version"=>["
> 3.1"]},
{"name"=>"code_metrics", "version"=>["> 0.1"]},
{"name"=>"redcard", "version"=>[">= 0"]},
{"name"=>"coderay", "version"=>[">= 0"]},
{"name"=>"multi_json", "version"=>[">= 0"]},
{"name"=>"launchy", "version"=>["
> 2.0"]},
{"name"=>"rcov", "version"=>["~> 0.8"]}]}}

Any clue?

@bf4
Copy link
Member

bf4 commented May 22, 2015

On Fri, May 22, 2015 at 2:06 PM, ChrisAndrew [email protected]
wrote:

"RUBYOPT=-rbundler/setup"

this would be my first guess, will take a deeper look later

@bf4
Copy link
Member

bf4 commented May 22, 2015

mind taking a look at simplecov-ruby/simplecov#340 as well?

@bf4 bf4 closed this as completed May 22, 2015
@bf4 bf4 reopened this May 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants