feat: add recipient list generator#218
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Test Results 1 files 1 suites 2m 47s ⏱️ Results for commit 0652607. ♻️ This comment has been updated with latest results. |
🔍 PR Validation ResultsVersion: `` ✅ Validation Steps
📊 ArtifactsDry-run artifacts have been uploaded and will be available for 7 days. This comment was automatically generated by the PR validation workflow. |
There was a problem hiding this comment.
Pull request overview
This PR adds a new Recipient List source generator to PatternKit’s messaging generators, along with generator tests, a DI-importable example, and documentation/catalog updates to reflect Recipient List source-generation coverage.
Changes:
- Introduces
GenerateRecipientListAttribute/RecipientListRecipientAttributeand an incrementalRecipientListGeneratorwith diagnosticsPKRL001–PKRL004. - Adds generator/unit tests plus an end-to-end example (including DI registration) and corresponding example tests.
- Updates docs and pattern/example catalogs to include generated Recipient List guidance and remove the previously tracked gap.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/PatternKit.Generators.Tests/RecipientListGeneratorTests.cs | Adds Roslyn-based tests validating generated output and diagnostics for the recipient list generator. |
| test/PatternKit.Generators.Tests/AbstractionsAttributeCoverageTests.cs | Extends attribute coverage tests for the new messaging attributes. |
| test/PatternKit.Examples.Tests/ProductionReadiness/PatternKitPatternCatalogTests.cs | Updates tracked-gap assertions now that Recipient List generation is implemented. |
| test/PatternKit.Examples.Tests/Messaging/RecipientListGeneratorExampleTests.cs | Adds example-level tests comparing fluent vs generated paths and DI importability. |
| test/PatternKit.Examples.Tests/DependencyInjection/PatternKitExampleDependencyInjectionTests.cs | Ensures the generated recipient list example is registered and runnable via DI. |
| src/PatternKit.Generators/Messaging/RecipientListGenerator.cs | Implements the incremental generator, emitting factories and reporting PKRL diagnostics. |
| src/PatternKit.Generators/AnalyzerReleases.Unshipped.md | Registers the new PKRL001–PKRL004 diagnostics in analyzer release notes. |
| src/PatternKit.Generators.Abstractions/Messaging/RecipientListAttributes.cs | Adds public attribute APIs consumed by generator users. |
| src/PatternKit.Examples/ProductionReadiness/PatternKitPatternCatalog.cs | Updates the pattern catalog entry to include generator/docs/example paths for Recipient List. |
| src/PatternKit.Examples/ProductionReadiness/PatternKitExampleCatalog.cs | Adds a new example descriptor for “Generated Recipient List”. |
| src/PatternKit.Examples/Messaging/RecipientListGeneratorExample.cs | Adds the fluent vs generated example implementation and generator-host type. |
| src/PatternKit.Examples/DependencyInjection/PatternKitExampleServiceCollectionExtensions.cs | Registers the new example as DI-importable and advertises integration surfaces. |
| docs/patterns/messaging/message-routing.md | Documents source-generated Recipient List usage in the routing patterns doc. |
| docs/patterns/messaging/enterprise-generators.md | Adds Recipient List generator section + diagnostics + API references. |
| docs/guides/pattern-coverage.md | Updates coverage table to mark Recipient List as covered by messaging generator. |
| docs/generators/messaging.md | Updates messaging generators doc to include the new generator. |
| docs/generators/index.md | Adds Recipient List entry to the generators index table. |
| docs/examples/toc.yml | Adds “Generated Recipient List” to the examples TOC. |
| docs/examples/index.md | Adds the new example to the examples landing page. |
| docs/examples/generated-recipient-list.md | Adds a dedicated example page describing registration and both execution paths. |
| docs/examples/enterprise-messaging-workflows.md | Adds the new source-generated recipient list example to the workflow suite table. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (HasDuplicates(recipients, out var duplicate)) | ||
| { | ||
| context.ReportDiagnostic(Diagnostic.Create(DuplicateRecipient, duplicate.Location, duplicate.Name, type.Name)); | ||
| return; | ||
| } | ||
|
|
||
| var syncRecipients = recipients.Where(static recipient => !recipient.IsAsync).OrderBy(static recipient => recipient.Order).ThenBy(static recipient => recipient.Name).ToArray(); | ||
| var asyncRecipients = recipients.Where(static recipient => recipient.IsAsync).OrderBy(static recipient => recipient.Order).ThenBy(static recipient => recipient.Name).ToArray(); |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #218 +/- ##
==========================================
+ Coverage 91.99% 96.68% +4.68%
==========================================
Files 256 259 +3
Lines 24117 24357 +240
Branches 3274 3312 +38
==========================================
+ Hits 22187 23549 +1362
+ Misses 859 808 -51
+ Partials 1071 0 -1071
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:
|
Code Coverage |
Summary
Validation