Skip to content

Add option to generate ExcludeFromCodeCoverage on source generated objects #1255

Open
@zachcwillson

Description

Is your feature request related to a problem? Please describe.
Depending on team tooling, adding excludes for each class or namespace that gets added can be cumbersome.

Describe the solution you'd like
A new bool value added to the NativeMethods.txt schema, maybe named excludeFromCodeCoverage, that when set to true (default false), will add [ExcludeFromCodeCoverage(Justification = "Source Generated Object")] to all generated classes.

Describe alternatives you've considered

  • Add partial class/struct entries in our project for each type and adding the attribute.
  • Configuration of code coverage settings file

Additional context
N/A

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions