-
Notifications
You must be signed in to change notification settings - Fork 287
Description
Is your feature request related to a problem? Please describe.
Lcov supports showing "Line Coverage" and "Branch Coverage" percentage Per Function. Gcov's "List Of Functions" output lacks that. It only shows the function line number and "Number Of Calls". We want to use gcovr (Cause python!) but also get coverage stats per function rather than just whole file
Describe the solution you'd like
This isn't the full solution but its what I was able to get to work somewhat easily. GCovr already pulls out "gcov blocks executed" from gcov files, puts in an object and does nothing with it.... The solution is to just push that data up to the html, json and xml files and put it in them. "gcov blocks executed" is very close to line and branch coverage so it should work. If not I might propose further improvements but this is a simple start.
Describe alternatives you've considered
I thought about not touching gcovr but use one of its existing outputs to then add something on top of that, but the "blocks executed" data is not published to any file type.
Additional context
Lcov output -
Current gcov "List Of Functions" output -
Proposed gcovr "List Of Functions" output -
NOTEI also got rid of "File" column and made it a header. It would make me scroll to the right to see other columns (had to zoom out to get the snapshot) which was a bit annoying.