lcov file is empty when using C# source generator
See original GitHub issueI’ve been using Coverlet with Coveralls on my project for a long time. I don’t know when it started happening but now the report only includes methods from a dependent project.
I’m using the latest versions of xunit
, Microsoft.NET.Test.Sdk
, and coverlet.collector
. I’m using net5. 0
.
In the command line I’m typing:
dotnet test ./NetFabric.Hyperlinq.UnitTests/NetFabric.Hyperlinq.UnitTests.csproj -f:net5.0 -c:Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings --diag:log.txt
The coverlet.runsettings
file only has the following:
<?xml version="1.0" encoding="utf-8" ?>
<RunSettings>
<DataCollectionRunSettings>
<DataCollectors>
<DataCollector friendlyName="XPlat code coverage">
<Configuration>
<Format>lcov</Format>
<!-- <Include>[NetFabric.Hyperlinq]*</Include> -->
<!-- <Exclude>[NetFabric.Assertive]*</Exclude> -->
<UseSourceLink>true</UseSourceLink>
</Configuration>
</DataCollector>
</DataCollectors>
</DataCollectionRunSettings>
</RunSettings>
In the generated logs I can see references to the classes of my main project but they keep not showing up in the coverage.info
file.
Issue Analytics
- State:
- Created 3 years ago
- Comments:22
Top Results From Across the Web
lcov file is empty when using C# source generator
I've been using Coverlet with Coveralls on my project for a long time. I don't know when it started happening but now the...
Read more >lcov issue generating output file - code coverage
As a workaround, I modified the LCOV code such that if the header returned was empty, the source file name is assumed directly...
Read more >LCOV Code Coverage
This short tutorial aims to describe how to generate lcov reports. ... This guide assumes you have the libreoffice source code in ......
Read more >coverage is empty
Can you guys help a former Googler, I have been trying to generate coverage report with bazel and no matter what I do,...
Read more >Measuring code coverage with S2E
You can get LCOV HTML reports when source code is available and the binary has suitable debug information. You can get basic block...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Glad it worked, @potatopeelings! Those files end up in the
obj
directory so they can be inspected to aid in tracking down issues with the generated code.Sorry for delay @aalmada super busy period, anyway should work also with vstest, I’ll keep this open for future investigation