dnaka91/llvm-cov-pretty

Coverage info doesn't match 100% with `llvm-cov`'s report

Opened this issue · 1 comments

Describe the bug

I noticed that the displayed coverage isn't always the same as seen in the regular llvm-cov output. Already fixed partially locally, but especially the regions for missing instantiations are not correct.

Expected behavior

The report should always match 100% with what is visible in llvm-cov. Some parts may of course be different in how they're displayed, but the information about what lines are not covered should always be correct.

To reproduce

No response

What operating system are you using?

None

Terminal output

No response

Additional context

This will need some more tinkering, as I didn't find the pattern in the JSON data yet, that would allow me to match the instantiation messages 100% with llvm-cov.

But at least the basic coverage data is already fixed, and a new version will be released soon.

Okay, partially solved this.

The coverage should now be correct in the latest release. The problem was that there are two layers of coverage. Overall coverage areas per file, and then function invocations.

Inside a covered area (on the file level), there can still be the lack of a function call. Technically not even a function call but any form of invocation. For example, branch in a match statement that was never triggered. These were still marked as covered in my report.

Now those are correctly reported, overriding the color of a covered area.

But still struggling to find a pattern that matches exactly the llvm-cov report when it comes to displaying missing invocations. The LLVM code didn't give much clue, as the reporting code operates on different data than in the JSON output.

So I'll have to just look at different report, compare them and look for anything in the raw JSON data that could give me some insight...