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

Add precision option for reported percentages #78

Open
irongut opened this issue Aug 26, 2022 · 0 comments
Open

Add precision option for reported percentages #78

irongut opened this issue Aug 26, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request Options An issue related to the Action's parameters. Summary An issue related to creating the code coverage summary.
Milestone

Comments

@irongut
Copy link
Owner

irongut commented Aug 26, 2022

Feature Request

Reported percentages are rounded to whole numbers which can lead to confusion if a percentage is rounded up to apparently meet a threshold but the package is reported as failing to meet it because the calculation uses the full floating point number. A precision option would allow users to choose how many decimal places they wish to see.

Expected Behaviour

  • Percentages in results will be displayed with 0 - 2 decimal places depending on setting; default 0.
  • Setting negative values will result in 0 decimal places.
  • Setting precision higher than 2 will result in 2 decimal places.

Additional Context

Based on sample outputs different tools record metrics with different precision in the coverage file. The most common seems to be 4 decimal places, which translates to 2 decimal places for percentages. Consider rounding all values on reading to 4 decimal places or based on this setting.

Linked To

#68 Coverage percentage is wrong

@irongut irongut added enhancement New feature or request Options An issue related to the Action's parameters. Summary An issue related to creating the code coverage summary. labels Aug 26, 2022
@irongut irongut added this to the vNext milestone Aug 26, 2022
@irongut irongut self-assigned this Aug 26, 2022
@github-actions github-actions bot added this to To do in Enhancements Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Options An issue related to the Action's parameters. Summary An issue related to creating the code coverage summary.
Projects
Development

No branches or pull requests

1 participant