Description
openedon Nov 23, 2020
While testing #17067 I found an issue in coverlet where curly braces in file names breaks the logger that is required for CI builds, which in turn prevents some (many, actually, including Azure.Core) assemblies from getting covered with an error message like so:
TpTrace Verbose: 0 : 9956, 1, 2020/11/23, 14:06:13.817, 5686906590323, datacollector.dll, [coverlet]Mapping resolved: '/_2/autorest.csharp.v3/1.0.0-alpha.20201028.2/content/Generator.Shared/ResponseWithHeaders.cs' -> 'C:\Users\heaths\.nuget\packages\autorest.csharp.v3\1.0.0-alpha.20201028.2\content\Generator.Shared\ResponseWithHeaders.cs'
This is evident with /p:ContinuousIntegrationBuild=true
is passed, which is used to run the CoverletGetPathMap
MSBuild target in that PR which in turn allows code coverage to work (without it, you can't filter out unrelated or undesirable files).
The logging method that fails is always called whether verbose logging is enabled or not: all logging methods would have this problem, but it's file source mapping method that calls Verbose
and we need that to run. Instead, we'll have to rename files and disable SA1649 warnings for those affected files since OfT
is not considered a valid file name (though it's a common pattern even used in https://github.com/dotnet/runtime).