-
Notifications
You must be signed in to change notification settings - Fork 385
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
Assembly marked as ExcludeFromCodeCoverage is not excluded #290
Comments
@SefaOray exclusion attributes don't work on assemblies by design. The |
@tonerdo could you please clarify? I have the same issue here, and ExcludeFromCodeCoverage must work on assemblies https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis.excludefromcodecoverageattribute. |
@sshukurov by this I mean that Coverlet doesn't check for attributes on assemblies. It does however, have an |
@tonerdo it's a pity. I want to define all my exclusions in code, so that different code coverage tools can reuse them. |
Agree that ExcludeFromCodeCoverage should work for assemblies unless there is a reason not to. |
This should be supported. May this issue be reopened? (And eventually handled... this should not be too complicated to implement.) |
This would be useful. I usually execute unit tests and coverage multiple ways: IDE, command line, etc. Declaring this in an assembly attribute would apply to all methods. |
Guys if someone of you can trust the feature we'll be more confident. |
@MarcoRossignoli @tonerdo this is exactly what we need :) Is there an ETA for when this fix will be released? |
@simonness can you try with nightly to confirm the fix?
We don't have a strict release plan at the moment(we're working on it) my idea is one release every quarter(if there are bug we'll release immediatly), so I think for the end of the year, last release 23 Sep https://github.com/tonerdo/coverlet/blob/master/Documentation/ReleasePlan.md#proposed-next-versions |
I still see the same issue in VS 2019 with collector v.1.3.0. Can someone help? |
@Pedramrezaei can you open a new issue?Do you want to skip all assembly? |
When you look at the attribute (link below) it specifies it is valid on assemblies, yet it doesn't change the output. Is this an error in documentation? |
guys, does it work already? if yes, from which version? |
Description
When an assembly decorated with ExcludeFromCodeCoverage attribute, it is not excluded from coverage report.
Repro steps
Example code:
Expected behavior
Assembly is excluded from the coverage report
Actual behavior
Assembly is included in the coverage report
Known workarounds
Passing the assembly with --exclude "[Assembly]*" works
Related information
Cross platform .NET Core code coverage tool version 1.3.0.0
Visual Studio Version: Visual Studio Professional 2017
Microsoft (R) Test Execution Command Line Tool Version 15.9.0
Test project build with .Net Core 2.1
The text was updated successfully, but these errors were encountered: