Mark TestMetadataGenerator output with GeneratedCode attribute#4690
Mark TestMetadataGenerator output with GeneratedCode attribute#4690
Conversation
…ataGenerator output Co-authored-by: thomhurst <30480171+thomhurst@users.noreply.github.com>
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. This PR correctly adds |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. SummaryThis PR cleanly adds ✅ Follows existing patterns - Uses the exact same attribute pattern as The implementation is straightforward and will improve code coverage reporting by properly marking auto-generated code for exclusion from coverage metrics. |
…dCode attributes The original PR only updated DotNet9_0 variants but missed DotNet8_0, DotNet10_0, and Net4_7 framework-specific snapshot files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…utes The PR #4690 missed updating the STAThreadTests snapshot files when adding [ExcludeFromCodeCoverage] and [GeneratedCode] attributes to source generator output, causing the Windows CI pipeline to fail on snapshot verification. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…utes (#4693) * Initial plan * Add GeneratedCode and ExcludeFromCodeCoverage attributes to TestMetadataGenerator output Co-authored-by: thomhurst <30480171+thomhurst@users.noreply.github.com> * fix: update remaining framework-specific snapshot files with GeneratedCode attributes The original PR only updated DotNet9_0 variants but missed DotNet8_0, DotNet10_0, and Net4_7 framework-specific snapshot files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: Update missed STAThread snapshot files with GeneratedCode attributes The PR #4690 missed updating the STAThreadTests snapshot files when adding [ExcludeFromCodeCoverage] and [GeneratedCode] attributes to source generator output, causing the Windows CI pipeline to fail on snapshot verification. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
The
TestMetadataGeneratorwas not marking generated code with[GeneratedCode]or[ExcludeFromCodeCoverage]attributes, preventing code coverage tools from properly excluding it.Changes
[GeneratedCode]and[ExcludeFromCodeCoverage]attributes to generated test metadata classesGenerated Code
Before:
After:
This aligns with existing patterns in
InfrastructureGeneratorandDynamicTestsGenerator.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.