-
Notifications
You must be signed in to change notification settings - Fork 554
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
Erroneous red flagging of blank lines when merging covered file results with uncovered file results #444
Comments
This was referenced Jan 8, 2016
This is definitely an issue and the provided solution works. Thanks 💯 |
+1 for this fix. It seems to have worked in my env - Ruby 2.2.3, SimpleCov 0.11.2. |
Miloshes
added a commit
to Miloshes/simplecov
that referenced
this issue
Mar 10, 2016
I suspect that this is fixed by #441 |
I can confirm that the fix suggested did it for me |
iNecas
added a commit
to iNecas/foreman
that referenced
this issue
May 2, 2016
To get the results, one needs to: for x in test:units test:lib test:functionals test:integration; do export SIMPLE_COV_NAME=$x; bundle exec rake $x; end We need to use older simplecov, as newer one has issue when merging the coverage results simplecov-ruby/simplecov#444
jwworth
added a commit
to hashrocket/hr-til
that referenced
this issue
Jul 25, 2016
Seems this was fixed by #441 - thanks! :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SimpleCov 0.11.1: This error occurs when using rspec and cucumber in two different runs and expecting them to be properly merged and an accurate map displayed. I'm confident it occurs in similar situations as well.
To reproduce:
I believe this is because of faulty logic in line 7 of lib/simplecov/merge_helpers.rb. It reads
if element.nil? && new_array[i].nil?
when it should read
if element.nil? || new_array[i].nil?
The original logic (see context) allows a 0 to wipe out the nil which serves as a comment indicator, erroneously replacing it with a 0, resulting in erroneous red highlighting of comments and blank lines.
You can create a logic table to see why the original code is faulty and this fix corrects it.
When I make this change the error goes away.
If I get time I'll make this correction and submit a PR. But I wanted others to know about this in case they need a quick fix before I can get to it.
You can just edit the code in place for a quick fix. You can do a "gem which simplecov" on your console to find the code location.
The text was updated successfully, but these errors were encountered: