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

Use Float#floor instead of Float#round #130

Open
elkesrio opened this issue Jan 19, 2024 · 3 comments · May be fixed by #146
Open

Use Float#floor instead of Float#round #130

elkesrio opened this issue Jan 19, 2024 · 3 comments · May be fixed by #146

Comments

@elkesrio
Copy link

elkesrio commented Jan 19, 2024

This is a follow-up of simplecov-ruby/simplecov#679

I'm having a 100% test coverage with some missed lines

image (5)

I suggest to stick with using Float#floor instead of round as simplecov does.

The changes would be in :

  • lib/simplecov-html.rb:41
  • lib/simplecov-html.rb:42
  • views/covered_percent.erb:2
  • views/file_list.erb:10
  • views/file_list.erb:61
  • views/file_list.erb:66
  • views/file_list.erb:68

Are you open to merge pull requests? I can submit one

@bquorning
Copy link

I had simplecov-html tell me my coverage was 98.45. Changed the config, and now simplecov tells me my coverage is lower that what I configured. Since simplecov compares using <, I think it’s necessary for simplecov-html to use #floor as suggested in this issue.

Branch Coverage: 98.45% (760 / 772)
Branch coverage (98.44%) is below the expected minimum coverage (98.45%).

cc @amatsuda

@amatsuda
Copy link
Member

amatsuda commented Feb 9, 2025

Thank you for reporting, but you don't need to ask for permission to patch. Please feel free to patch anytime when you have a patch in your mind.

@bquorning bquorning linked a pull request Feb 9, 2025 that will close this issue
@bquorning
Copy link

PR ready at #146.

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

Successfully merging a pull request may close this issue.

3 participants