markis/vscode-code-coverage

C# support

TwitchBronBron opened this issue · 2 comments

Would it be possible to enhance this tool to support other languages as well (such as C#)? For example, I can use the Coverlet library in dotnet to generate an lcov output file which would technically be compatible with the javascript versions of the coverage reports.

dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=../coverage/lcov-results.info

Here's the output from that file.

SF:C:\projects\my-dotnet-project\ReusableLibrary\SpecialClass.cs
FN:7,System.String ReusableLibrary.SpecialClass::GetClassName(System.Boolean)
FNDA:2,System.String ReusableLibrary.SpecialClass::GetClassName(System.Boolean)
DA:8,2
DA:9,2
DA:10,1
DA:11,1
DA:14,1
DA:15,1
DA:17,2
BRDA:9,4,0,1
BRDA:9,4,1,1
LF:7
LH:7
BRF:2
BRH:2
FNF:1
FNH:1
end_of_record

I am not sure, do you have an example project?

Sure! Try this one. It's about as basic as you can get, but should do the job. Let me know if you need any help