Closed Tdue21 closed 9 years ago
Sorry that's not possible with ReportGenerator. You can only ignore complete assemblies.
You could create a custom attribute (see this sample: https://github.com/danielpalme/ReportGenerator/blob/master/ReportGenerator.Testprojects/CSharp/Project/CoverageExcludeAttribute.cs) and use the "-excludebyattribute:*.CoverageExclude*"
switch of OpenCover
Sorry that's not possible with ReportGenerator. You can only ignore complete assemblies. You could create a custom attribute (see this sample: https://github.com/danielpalme/ReportGenerator/blob/master/ReportGenerator.Testprojects/CSharp/Project/CoverageExcludeAttribute.cs) and use the
"-excludebyattribute:*.CoverageExclude*"
switch of OpenCover
Hello Daniel,
Since this reply is old, I would like to check if this is still not possible or there is any solution/workaround to include/exclude specific namespace
I'm sorry, there is not filter option for namespaces.
For ASP.NET Core it would be very useful as views are compiled to same assembly with web project code. Example on image below. Check the first lines starting with AspNetCoreGeneratedDocument.
@gpeipman The following command line argument should help in your case to exclude the views: -classfilters:-AspNetCoreGeneratedDocument.Views__*
I have read through the document of both OpenCover and ReportGenerator, and no matter what I do I cannot get ReportGenerator to exclude a certain namespace from the reports.
I am using ReSharper and one of the things this excellent tool offers, is to add a file called Annotations.cs which helps with code analysis and so on. However, there are a lot of micro classes in this namespace, and I would really like to to exclude this namespace. How do I do that?