How to add filters to OpenCover tool to skip some of the functions in classes?

StackOverflow https://stackoverflow.com/questions/23084524

  •  04-07-2023
  •  | 
  •  

سؤال

I am able to add filters to OpenCover for skipping the classes in open cover. I want to know, How to add filters to OpenCover tool to skip some of the functions in classes?

For Example something like below(but it is not working)

-[*AProjectManagement*]A.VsIde.AStudio.Project.Management.AProjectNode.AddFile

Where,

AProjectNode is class name and AddFile is a function.

Main reason for asking this, I am using the third party SDK Inferfaces and I have to implement all of them even though I am not using it in client code. I want to avoid coverage for those function.

Is it possible?

هل كانت مفيدة؟

المحلول

No filters available at this point in time, you could use a custom attribute and then use the -excludebyattribute feature.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top