Add support for configurable decimal precision#1468
Merged
hcoles merged 2 commits intoJun 1, 2026
Conversation
Signed-off-by: see-quick <maros.orsak159@gmail.com>
…otals Signed-off-by: see-quick <maros.orsak159@gmail.com>
Contributor
Author
|
Gentle ping @hcoles. |
Owner
|
@see-quick I should be able to look at this next week. |
Contributor
Author
|
Hi @hcoles, just checking in. Any updates on this? |
Owner
|
Merged now, thanks. If you could also raise a PR against https://github.com/hcoles/pitest-site To document the changes, that would be helpful. |
Contributor
Author
Yeah, I will try this week, if I find some free cycles. Thanks. |
This was referenced Jun 3, 2026
Contributor
Author
|
Do you think there could be a patch release (i.e., 1.25.4) for this soon? |
Owner
|
@see-quick - released now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change adds a
thresholdPrecisionparameter (default 0, fully backward compatible) that controls how many decimal places are used when computing and comparing coverage and mutation thresholds.With integer only thresholds, there is an unavoidable
~1percentage point blind spot where coverage can silently regress without triggering a build failure.For example, a project with coverageThreshold=61 won't catch a drop from 61.8% to 61.1% (i.e., both round to 61%).
Moreover, rather than maintaining two parallel APIs (i.e., one returning
int, anotherBigDecimal) the thresholds were changed to BigDecimal throughout. A single path withprecisionset to0produces identical results to the old integer behaviour, so the dual-API approach would add complexity without any behaviour benefit.Closing #1464.
I have tested local build with my project, and it seems to work fine without any issues. Let me know what you think about it @hcoles. Hopefully I didn't forgot anything.
This is project view I had to make a few CSS/HTLM tweaks but eventually get it worked.
Project view:
Package view: