Add option to generate ExcludeFromCodeCoverage on source generated objects #1255
Open
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