Feature/28 generator create factory pattern#59
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #59 +/- ##
==========================================
+ Coverage 75.89% 83.51% +7.61%
==========================================
Files 77 80 +3
Lines 5261 6204 +943
Branches 819 1024 +205
==========================================
+ Hits 3993 5181 +1188
- Misses 992 1023 +31
+ Partials 276 0 -276
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR implements a comprehensive factory pattern generator feature, adding source generators for Factory Method and Factory Class patterns. The generators produce compile-time factory code with support for async operations, enum keys, and comprehensive diagnostics.
Key changes:
- New
FactoriesGeneratorwithFactoryMethodAttributeandFactoryClassAttributesupport - Comprehensive test suite with 15+ test cases covering sync/async scenarios, error cases, and edge cases
- Complete documentation including troubleshooting guide and examples
- Integration with DI/orchestration patterns in examples
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| src/PatternKit.Generators/Factories/FactoriesGenerator.cs | Core generator implementation with incremental generation, diagnostics, and code emission |
| src/PatternKit.Generators/Factories/FactoriesAttributes.cs | Attribute definitions for factory method/class patterns |
| src/PatternKit.Generators/PatternKit.Generators.csproj | Generator project configuration with analyzer packaging |
| src/PatternKit.Generators/Shims/NetStandard20.cs | netstandard2.0 compatibility shim for IsExternalInit |
| test/PatternKit.Generators.Tests/FactoriesGeneratorTests.cs | Comprehensive test suite covering all generator scenarios |
| src/PatternKit.Examples/Generators/FactoryGeneratorExamples.cs | Real-world examples showing DI module configuration and orchestration |
| docs/generators/*.md | Documentation for generator usage, API, diagnostics, and troubleshooting |
| various packages.lock.json | Dependency updates for Microsoft.Extensions.DependencyInjection |
| src/PatternKit.Core/Behavioral/Visitor/ActionVisitor.cs | Documentation comment improvement |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Code Coverage |
No description provided.