Skip to content

Conversation

skarllot
Copy link
Contributor

What’s changed

Two internal attribute types in RegisterAttributesExtensions.cs are now marked as generated code and excluded from code-coverage analysis.

  • GeneratedCode attribute signals to tools that these types are auto-generated.
  • ExcludeFromCodeCoverage ensures coverage reports (e.g. Coverlet, Visual Studio) skip these classes.

Why

Coverage tools can skew metrics by including boilerplate attribute definitions that aren’t hand-written or relevant to business logic. By marking them as generated and excluding them, we:

  • Keep overall coverage percentages meaningful
  • Avoid noise when tracking real coverage gaps
  • Follow best practices for generated code hygiene

How to verify

  1. Run your coverage suite (e.g. dotnet test /p:CollectCoverage=true).
  2. Observe that neither of the two attribute classes appears in the coverage report.
  3. Confirm no other tests or behavior have regressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant