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

Support limit configuration as percent #534

Closed
mattnelson opened this issue May 15, 2017 · 1 comment
Closed

Support limit configuration as percent #534

mattnelson opened this issue May 15, 2017 · 1 comment

Comments

@mattnelson
Copy link
Contributor

Support limits configured as decimal or percent.

I am in the process of migrating a large number of projects over to jacoco from clover due to the recent byte code filtering enhancements. In an attempt to minimize the amount of changes. I would like to be able to represent the coverage target in the same data format. My proposal is to support decimal and percent configurations by parsing the value in setMinimum[1] and setMaximum[2]. I'm not sure on the process this project follows for contributions since I didn't find anything in the readme/wiki. Is this a change you would be willing to accept? If so, I will issue a pull request.

<limit>
    <counter>INSTRUCTION</counter>
    <minimum>0.105</minimum>
    <minimum>10.5%</minimum>
</limit>

[1] https://github.com/jacoco/jacoco/blob/v0.7.9/org.jacoco.report/src/org/jacoco/report/check/Limit.java#L126
[2] https://github.com/jacoco/jacoco/blob/v0.7.9/org.jacoco.report/src/org/jacoco/report/check/Limit.java#L147

@marchof
Copy link
Member

marchof commented May 16, 2017

@mattnelson In general we accept PRs here. We're a pit picky about quality and clear concepts though 😉

But you proposal sounds reasonable. Please find some information for contributions here:

http://www.jacoco.org/jacoco/trunk/doc/conventions.html

Thanks!

marchof added a commit that referenced this issue May 18, 2017
Support limit ratios as percents (#534)
@marchof marchof added this to the 0.8.0 milestone May 18, 2017
@marchof marchof closed this as completed May 18, 2017
@jacoco jacoco locked as resolved and limited conversation to collaborators Jan 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants