baynezy
baynezy

Reputation: 7036

Using a config file with dotCover CLI seems ot filter out all code

I have the following config for dotCover:

dotcover-filters.xml

<?xml version="1.0" encoding="utf-8"?>
<AttributeFilters>
    <AttributeFilterEntry>
        <ClassMask>System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute</ClassMask>
    </AttributeFilterEntry>
</AttributeFilters>

If I run dotnet dotcover test --dcReportType=HTML then the report is generated properly.

If I run dotnet dotcover test --dcReportType=HTML --dcFilters=+:.\dotcover-filters.xml then the report is empty.

I currently have zero instances of [ExcludeFromCodeCoverage] yet.

My goal is to use [ExcludeFromCodeCoverageAttribute] to indicate that certain code should not be assessed for coverage.

What am I doing wrong?

Upvotes: 0

Views: 6

Answers (0)

Related Questions