Open tannertaylor opened 1 year ago
At first sight I don't see anything you are missing. In general empty lines aren't instrumented and thus also shouldn't be part of the report. Here is an example for that:
It would be very helpful for us if we would have a simple repro for that 🙂.
This issue is stale because it has been open for 3 months with no activity.
coverlet seems to be reporting blank lines as not covered. I've obscured this image to protect company source code, but if you refer to the gutters on the left, you can see a few red markers indicating missing coverage on blank lines.
At first, I thought this may just be the Coverage Gutters VS Code extension, but I see the same thing when looking at the cobertura.xml, which reports an 85% line rate, consistent with what you see in the gutters:
I wouldn't expect blank lines to throw off my coverage numbers. Am I missing some configuration setting?
For the record, I'm using coverlet.msbuild and running this command:
dotnet test /p:CollectCoverage=true /p:CoverletOutput='../../coverage/' /p:CoverletOutputFormat="cobertura%2cjson" /p:MergeWith='../../coverage/coverage.json' /p:ExcludeByAttribute='ExcludeFromCodeCoverage' -m:1'