tarpaulin
tarpaulin copied to clipboard
Partial struct initialization included in a coverage report
Describe the bug
Hi there,
Sometimes a structure initialization included in a coverage report but only partially. Whereas sometimes it's not included at all.
I did tried to reproduce it by a minimal example but didn't managed easily.
Sorry if it's a duplicate.
Expected behavior
I suppose the report must be consistent in approach?
The constants like ""
end up being optimised out a lot of the time and don't result in instructions I can catch in the coverage instrumentation. I believe now it should just ignore constants and just simple variable assigns but not ignore function calls or more complicated expressions.
Ah just noticed the second one is a generic function. The stuff to ensure unused generic functions and methods are included in the report is over eagerly adding back in the lines :eyes:. I'll look into that at some point before the next release