-
Notifications
You must be signed in to change notification settings - Fork 388
ExcludeFromCoverage method annotation does not exclude common forms of compiler generated code #82
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
Comments
It should also come as no surprise that C#7.0 local functions are similarly not excluded even if the enclosing method is. |
Thanks for reporting this. Definitely an oversight, will look into a fix. Any ideas you might have a welcome |
In the C# case, at least, the synthetic name contains the name of the lexically surrounding function in angle-brackets. Where there isn't an overload of that method name, that will do the job. Overloads are going to be trickier to resolve. |
…/coverlet#82 Add own methods in InfoCarrier.Core.Common.Utils (slightly simplified according to limited needs)
In the following C# class I exercise the static method
Normal
and exclude pretty much everything else with[ExcludeFromCoverage]
; the annotation takes for the simple methodCanary
, but essentially none of the other methods. In the F# code below it (linking the same coverage exclusion attribute), nested functions, lambdas and computation expressions are all still included.The text was updated successfully, but these errors were encountered: