Skip to content

[BUG] with Exclude certain classes in certain assemblies #1729

@stewartmossSingular

Description

@stewartmossSingular

Describe the bug
The tag is not processing correctly on v6.0.3 but v6.0.2 does work correctly.

To Reproduce
My coverlet.runsettings file.

`

[*Migrations]*, [*]*.Startup, [*]*.StartupExtensions, [*]Bob.Core.Security.* true `

Project file for test project
<PackageReference Include="coverlet.collector" Version="6.0.3"> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <PrivateAssets>all</PrivateAssets> </PackageReference>

we are using xunit 2.9.3 and xunit.runner.visualstudio

Expected behavior
On version 6.0.2 any class in the namespace Bob.Core.Security.* are excluded (for example Bob.Core.Security.MaintenanceRoles is correctly excluded). On 6.0.3 we are finding that everything is excluded and not the expected behavior of the 6.0.2 exclude.
The expected behavior is that all classes from Bob.Core.Models should be shown except for Bob.Core.Security.MaintenanceRoles.

Actual behavior
On version 6.0.2 any class in the namespace Bob.Core.Security.* are excluded (for example Bob.Core.Security.MaintenanceRoles is correctly excluded). On 6.0.3 we are finding that everything in Bob.Core.Models assembly (which contains the Bob.Core.Security.MaintenanceRoles class) is being excluded. In fact when I have [*] as the assembly name, our code coverage report shows absolutely nothing.

Configuration (please complete the following information):
Please provide more information on your .NET configuration:
* Which coverlet package and version was used? 6.0.2 correct 6.0.3 wrong
* Which version of .NET is the code running on? 8.0.404 SDK
* What OS and version, and what distro if applicable? Windows 11 Visual Studio 22
* What is the architecture (x64, x86, ARM, ARM64)? x64
* Do you know whether it is specific to that configuration? Unknown

Additional context
The command which is being executed in the test project directory:
dotnet test -c Release --collect XPlat Code Coverage --settings C:\Clients\xxx\xxx-bob\Server\Bob.Domain\Bob.Core.Tests\coverlet.runsettings

❗ Please also read Known Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions