coverlet-coverage / coverlet

Cross platform code coverage for .NET
MIT License
2.93k stars 385 forks source link

[BUG] 6.0.1 breaks with multiple exclude-by-attribute parameters #1624

Closed david-beckman closed 4 months ago

david-beckman commented 4 months ago

Describe the bug Starting with 6.0.1, multiple exclude-by-attribute parameters results in an error

To Reproduce coverlet.exe $testFile --target "dotnet" --format "covertura" --exclude-by-attribute "Obsolete" --exclude-by-attribute "GeneratedCode" --exclude-by-attribute "CompilerGenerated"

Expected behavior Any of the matching attributes are excluded from the coverage results.

Actual behavior The exe fails returning Option '--exclude-by-attribute' expects a single argument but 3 were provided. NOTE: running the same command on 6.0.0 succeeds

Configuration (please complete the following information): Please provide more information on your .NET configuration:

Additional context (none)

huideaki commented 4 months ago

Same issue found on 6.0.1 on our side

Option '--exclude-by-attribute' expects a single argument but 2 were provided.
khoait commented 4 months ago

having the same issue with 6.0.1

daveMueller commented 4 months ago

We changed the used cli framework for coverlet.console but tried not to make a breaking change. Unfortunately this slipped us. The linked PR will fix it. Thanks for reporting. 🙏