-
Notifications
You must be signed in to change notification settings - Fork 1.2k
limit > 1 breaks rule config #783
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
Comments
In absence of complete example (please consider providing such in future), I created jacoco-783.zip for which After reading documentation 😉 could be noted that description of "rules" in it clearly shows that value |
Message produced for the above example
doesn't have word "percentage" and uses term It is shown as Specification of
and specification of
|
Also documentation is very clear about this:
https://www.jacoco.org/jacoco/trunk/doc/check-mojo.html |
Perhaps the issue was not understood. This did not fix the issue. There is a bug in the reporting of unit test coverage. The amount of code covered by unit test should not change based on the value of a rule. That is the bug. |
@skywalker01101 if you ask for
if you ask for
Given that clearly documented as a feature that
and please consider that there are users who rely on this, for whom important to see same precision in message as they specify in configuration - this is not a bug. Your initial problem is misuse / misconfiguration - absence of What I can imagine - is an enhancement of error message: in case when ratio is greater than
in general case
But not change of mechanism of rounding, just because you want so. Because again - this will break configurations and expectations of users who rely on this. Highly likely that it won't be you, who will be dealing with questions about change of behavior. Rather than screaming "ALWAYS" please try to wear shoes of maintainers, who need to take into account existence of users with needs that can be different from yours. And who do this absolutely for free in their spare time. Fair enough? Thank you for your understanding. |
Steps to reproduce
I created a rule
This blows up saying every package in the project has 0% coverage. When I look at the html reports they still have real looking coverage info. This caused me to waste a lot of time and great frustration. I almost gave up.
JaCoCo version: jacoco-maven-plugin:0.8.2
Operating system: MacOS
Tool integration: Maven
Expected behaviour
If a value greater than 1 is entered it should either report an invalid limit or just show the package level as being below the impossible value of 1.
Actual behaviour
Currently blows up saying 0% coverage even though the html report shows the accurate value.
The text was updated successfully, but these errors were encountered: