Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
stewartmossSingular opened this issue Jan 14, 2025 · 4 comments
Closed

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

stewartmossSingular opened this issue Jan 14, 2025 · 4 comments
Labels
duplicate This issue or pull request already exists

Comments

@stewartmossSingular
Copy link

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

@github-actions github-actions bot added the untriaged To be investigated label Jan 14, 2025
@stewartmossSingular
Copy link
Author

I dont know how to paste XML

image

@stewartmossSingular
Copy link
Author

image

@stewartmossSingular stewartmossSingular changed the title [BUG] [BUG] with Exclude certain classes in certain assemblies Jan 14, 2025
@stewartmossSingular
Copy link
Author

stewartmossSingular commented Jan 14, 2025

I am sure this is related to #1726

@stewartmossSingular
Copy link
Author

Im closing this as this is a duplicate.

@Bertk Bertk added duplicate This issue or pull request already exists and removed untriaged To be investigated labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants