Search code examples
sonarqubecode-coverageopencover

How to exclude Class Properties in OpenCover?


For example I have a simple POCO like so:

public class Customer
{
   public int Age { get; set; }
}

I want to exclude the properties that follow this pattern. Note that I cannot exclude the whole class because in future I might add a method that needs coverage.


Solution

  • All the information you need us in the wiki

    https://github.com/opencover/opencover/wiki/Usage

    In this instance -skipautoprops is the switch you need.