We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I came across the same issue as #604 and added TestSDKAutoGeneratedCode to my ExcludeByAttribute usage (I'm using the MSBuild integration).
TestSDKAutoGeneratedCode
ExcludeByAttribute
However, it looks like coverlet assumes all attributes' type names will end with Attribute:
Attribute
coverlet/src/coverlet.core/Instrumentation/Instrumenter.cs
Lines 696 to 697 in f7c3fd4
I believe the fix would be to do something like this, to keep the original functionality:
return excludeAttributeNames.Any(a => a.EndsWith("Attribute") ? customAttribute.AttributeType.Name.Equals(a) : customAttribute.AttributeType.Name.Equals($"{a}Attribute"));
The text was updated successfully, but these errors were encountered:
Thank's for reporting this, feel free to provide a PR with some tests if you want(not obligated at all btw).
Sorry, something went wrong.
Thanks for checking in!
Will do, hopefully during the next 7 days.
No probs at all, at your pace!
Successfully merging a pull request may close this issue.
I came across the same issue as #604 and added
TestSDKAutoGeneratedCode
to myExcludeByAttribute
usage (I'm using the MSBuild integration).However, it looks like coverlet assumes all attributes' type names will end with
Attribute
:coverlet/src/coverlet.core/Instrumentation/Instrumenter.cs
Lines 696 to 697 in f7c3fd4
That isn't the case for
TestSDKAutoGeneratedCode
:https://github.com/microsoft/vstest/blob/50b5b33261f7593eb92ae221dae1b9c74234207e/src/Microsoft.TestPlatform.ObjectModel/CodeCoverage/TestSDKAutoGeneratedCode.cs#L10
I believe the fix would be to do something like this, to keep the original functionality:
The text was updated successfully, but these errors were encountered: