[go: up one dir, main page]

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

Feat: provide function/method in coverage overview #23

Open
GitMensch opened this issue Dec 6, 2022 · 4 comments
Open

Feat: provide function/method in coverage overview #23

GitMensch opened this issue Dec 6, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@GitMensch
Copy link

(which possibly is not always in the coverage data, but if it is that would be nice)

@tenninebt tenninebt added the enhancement New feature or request label Dec 6, 2022
@tenninebt
Copy link
Owner
tenninebt commented Dec 14, 2022

Had a look are the lcov, my understand is that when I comes to functions/methods, you don't have line details. You only have hits (How many tests passed by) and start line. Maybe I got it wrong.
If I'm right, then, if we would like to have the function/method level of details, we need to define what is expected in the view.
Haven't had the time to check the other coverage formats.

@GitMensch
Copy link
Author

You only have hits (How many test passed by) and start line. Maybe I got it wrong.

I see the same and that would be much better than "nothing". Anything more would need knowledge of "where does the function/method end" and then a look in "how much lines have coverage data passed/missed", then calculate a coverage in %.

That would be even much more useful, but not sure how hard that would be to implement vs. the lcov way (... or add both with a setting/toggle what to show).

@tenninebt
Copy link
Owner

Well, it seems that the end line is never there (We could cross match with the lines if we had start and end). Finding the end line is out of scope for this project if not specified in the coverage data.

@GitMensch
Copy link
Author

The "minimal" implementation for showing this for lcov generated data would be:

  • gather all functions as presented by lcov, show below each file
  • either get the data from lcov or otherwise calculate in the extension
    • for the function: lines covered / lines total
    • for the function coverage in the source: functions with at least one line covered (ideally use the information from above) / functions total

@tenninebt tenninebt changed the title FR: provide function/method in coverage overview Feat: provide function/method in coverage overview Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants