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

Always floor coverage instead of rounding #310

Merged
merged 2 commits into from
Oct 10, 2023

Conversation

albertored
Copy link
Contributor

@albertored albertored commented May 24, 2023

We do not want to report a 100% coverage when there are lines that are not covered.

@albertored
Copy link
Contributor Author

@parroty any news on this?

@albertored
Copy link
Contributor Author

PS: @parroty this is an improvement over #257 covering all the cases where percentages are calculated and formatted, if merged #257 can be closed

@parroty
Copy link
Owner

parroty commented Aug 9, 2023

Thanks for the follow-up 🙇 . Please let me separate this item from the current v0.17.0, as I would like to clarify the compatibility (breaking) portion of this change.

@tielur
Copy link

tielur commented Sep 25, 2023

@parroty interested when this is going out to hex, we are running into this on our CI reporting 100% even though it's not actually 100%

@parroty
Copy link
Owner

parroty commented Sep 29, 2023

I'm sorry about not responding to this... I have some concerns around the compatibility part. Could anyone help adding this as configuration option, as opt-in? 🙇

@albertored
Copy link
Contributor Author

Hi @parroty, I understand your concerns about being retro-compatible but I think the actual behaviour is conceptually wrong (showing 100% coverage when some lines are not covered). Are you open to adding a configuration option to restore the previous behaviour and make the floor coverage the default one? I.e. having an opt-out option instead of opt-in as you suggested

@parroty
Copy link
Owner

parroty commented Oct 2, 2023

Are you open to adding a configuration option to restore the previous behaviour and make the floor coverage the default one? I.e. having an opt-out option instead of opt-in as you suggested

Thank you for the comment 🙇 . I was originally thinking about maintaining the current behavior (opt-in for a floor coverage change), but it may be acceptable for the new settings for keeping the behavior considering your point (by noting it as a behavioral change in Changelog).

@albertored
Copy link
Contributor Author

Perfect, I'll add the option to this PR in a couple of days, thank you

We do not want to report a 100% coverage when there are lines
that are not covered.
@albertored
Copy link
Contributor Author

@parroty ready

@parroty parroty merged commit c76d8ed into parroty:master Oct 10, 2023
2 checks passed
@parroty
Copy link
Owner

parroty commented Oct 10, 2023

Thank you! (I'll be publishing the new version later).

@tonyvanriet tonyvanriet mentioned this pull request Jun 4, 2024
tonyrud added a commit to Vetspire/excoveralls that referenced this pull request Sep 27, 2024
* Cobertura now handles defprotocol and defimpl definitions (parroty#306)

* Cobertura now handles defprotocol and defimpl definitions

* Cobertura, catch all if module type is unknown

* Bump version and update CHANGELOG

* Add Cobertura docs to README.md (parroty#312)

* Update Elixir requirement to 1.11+ (parroty#316)

* Update Elixir requirement to 1.11+

* Update deps

* Replace hackney with httpc (parroty#311)

* Replace hackney with httpc

* SSL options

* FIXUP

* Cache fixed

* Aaaah, caching again

* FIXUP

* Add missing apps to :extra_applications

* Add better check for :public_key

* Bump version and update CHANGELOG

* Fix lcov 2.0 source file handling (parroty#315)

Prior to 2.0 being released, `genhtml` was much better about handling
source files from the following paths:

* `test/support/some_helper.ex`
* `lib/foo/bar.ex`

But after 2.0 was released, when rendering with `genhtml` the paths
would be mangled and look like the following:

* `test/support/test/support/some_helper.ex`
* `lib/foo/lib/foo/bar.ex`

I have tried in vain with many permutations of `--prefix` when running
`genhtml` but the ultimate fix that made all of this go away was using
the absolute path for the source file (`SF`).

* Update CHANGELOG

* Remove erroneous line in ExCoveralls.poster (parroty#318)

* Import `.coverdata` after test run and improve documentation (parroty#309)

* Import `.coverdata` after test run and improve docs

* Update README table of contents

* Update README based on review suggestion

Co-authored-by: Alberto Sartori <alberto.sartori.as@gmail.com>

---------

Co-authored-by: Alberto Sartori <alberto.sartori.as@gmail.com>

* Update CHANGELOG

* Accept custom http options (parroty#319)

* Accept custom http options

* Add HTTP options docs to README

* Bump version and update CHANGELOG

* Always floor coverage instead of rounding (parroty#310)

* Always floor coverage instead of rounding

We do not want to report a 100% coverage when there are lines
that are not covered.

* Add option to restore previous ceil coverage behaviour

* Bump version and update CHANGELOG

* Update README examples (parroty#320)

* Use explicit steps to remove 1.16 deprecation warning (parroty#322)

* Update CHANGELOG and bump version

* Detect and warn about incorrectly used ignore-comments (parroty#325)

* Detect and warn about incorrectly used ignore-comments

Resolves parroty#197.

* Keep existing ignoring behavior

* Improve formatting

* Test more ignore-related warnings

* Remove warning in the case of ignore-next-line at the EOF

* Test the warning output

* Add a changelog entry

* Adjust test descriptions

---------

Co-authored-by: Roman <205906+RKushnir@users.noreply.github.com>

* Fix Elixir 1.17 single-quoted string warning (parroty#327)

* Bump version and update CHANGELOG

* add missing step for Cobertura's range (parroty#329)

Without this change, the output is full of warnings such as
```
warning: negative steps are not supported in String.slice/2, pass 44..-1//1 instead
```

* Update CHANGELOG and version

* Revert "add missing step for Cobertura's range (parroty#329)" (parroty#330)

This reverts commit 00a96c4.

* Revert version change

* Update Range to use function syntax (parroty#332)

* add missing step for Cobertura's range

* Update Range to use function syntax

* run tests in elixir 1.17

* fix test with relative path

---------

Co-authored-by: parroty <parroty@users.noreply.github.com>

* Update CHANGELOG and version

---------

Co-authored-by: Rodrigue Villetard <rodrigue@villetard.tech>
Co-authored-by: parroty <parroty@users.noreply.github.com>
Co-authored-by: Artem Solomatin <artem00298@gmail.com>
Co-authored-by: Andrea Leopardi <an.leopardi@gmail.com>
Co-authored-by: Matthew Johnston <warmwaffles@gmail.com>
Co-authored-by: Zach Allaun <zach.allaun@gmail.com>
Co-authored-by: Alberto Sartori <alberto.sartori.as@gmail.com>
Co-authored-by: Victor Rodrigues <rodrigues@users.noreply.github.com>
Co-authored-by: gitneko <67227083+gitneko@users.noreply.github.com>
Co-authored-by: Roman <RKushnir@users.noreply.github.com>
Co-authored-by: Roman <205906+RKushnir@users.noreply.github.com>
Co-authored-by: Hans Krutzer <git@pixelspaceships.com>
Co-authored-by: Juan Peri <eternoperegrino@gmail.com>
Co-authored-by: Kenta Nakase <1172471+parroty@users.noreply.github.com>
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 this pull request may close these issues.

3 participants