🐛 Code Coverage: Coverage value shown for folders in the File Explorer doesn't match line coverage
Plugin Name
code-coverage
📜 Description
The coverage value shown in the File Explorer for folders doesn't match the line coverage value.
👍 Expected behavior
The coverage value reported for a folder should match ( total lines - missed lines)/total lines.
👎 Actual Behavior with Screenshots
In this case, the reported coverage for a top level directory was 67%.
However with 426 missed lines and 1492 tracked lines, we should have coverage of 1066/1492*100 = 71%
👟 Reproduction steps
- setup Backstage/ configure the code coverage plugin
- upload an lcov coverage report for a component with multiple files of differing lengths Example:
internal/
-- main.go (ex. 50 lines, 40 lines covered)
-- main_test.go
-- helper.go (ex. 200 lines, 50 lines covered)
-- helper_test.go
📃 Provide the context for the Bug.
Trying to avoid developer confusion when code coverage values don't line up as expected. Especially noticeable when looking at the root of a component and comparing with the line coverage value in the History tab.
👀 Have you spent some time to check if this bug has been raised before?
- [X] I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- [X] I have read the Code of Conduct
Are you willing to submit PR?
None
Contributions welcome to address this 👍
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.