simplecov-ruby / simplecov

Code coverage for Ruby with a powerful configuration library and automatic merging of coverage across test suites
MIT License
4.77k stars 553 forks source link

coverage data provided by Coverage exceeds number of lines output is getting out of hand #521

Closed ghost closed 4 years ago

ghost commented 8 years ago

I'm seeing this message a LOT more recently, sometimes 10-20 times in a row, for the same file.

Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]
Warning: coverage data provided by Coverage [95] exceeds number of lines in /Users/bm5k/src/myapp/app/controllers/my_controller.rb [83]

I get it. There were more lines in the coverage data than in the file. Do I really need to be told 28 times?

bf4 commented 8 years ago

Do I really need to be told 28 times?

@BM5k Probably not. Somebody should do something :)

BandanaPandey commented 8 years ago

@bf4 I am also getting this warning when simplecov is used in my app. And also this warning is appearing more number of times. I am having following in my project:: Rails 4.2.5 ruby 2.3.0 simplecov 0.12.0 simplecov-html 0.10.0 Any idea why this is happening?

PragTob commented 7 years ago

No idea why this is happening - it shouldn't ;)

A sample that reproduces the problem would be highly appreciated as otherwise it's very hard to debug from over here

PragTob commented 7 years ago

Hello,

a sample for reproduction would still be highly appreciated as it's otherwise hard to reproduce.

PragTob commented 4 years ago

Not sure if this is still happening, but without a reproduction script or better instructions nothing much can be done here I believe so closing until it pops up again.

podruh commented 1 year ago

Hi, I just encountered this on my project.

Ruby: ruby 3.2.1 (2023-02-08 revision 31819e82c8) +YJIT [x86_64-linux] Rails: 7.0.4.2 Slim: 4.1.0 Simplecov: 0.22.0 simplecov-cobertura 2.1.0

It only reports on Slim templates when I enable enable_coverage_for_eval. Should I open new issue? I may be able to create reproduction repo if interested.

joshuapinter commented 1 year ago

@podruh Yes please! I'm seeing the same thing after enabled enable_coverage_for_eval.