Skip to content

Conversation

@Dreamescaper
Copy link
Owner

No description provided.

@Dreamescaper Dreamescaper requested a review from Copilot May 19, 2025 10:58
@Dreamescaper
Copy link
Owner Author

Related to #28 .

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables the use of multiple CustomHandler attributes on a method by updating diagnostic messages, modifying the condition for detecting mixed usages, and adding new tests.

  • Updated diagnostic descriptors with clearer error messages.
  • Adjusted conditional logic in the dependency injection generator to check for improper attribute combinations.
  • Added comprehensive tests for scenarios with multiple CustomHandler attributes.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
ServiceScan.SourceGenerator/DiagnosticDescriptors.cs Updated error messages to better describe the mixed usage of GenerateServiceRegistrations attributes.
ServiceScan.SourceGenerator/DependencyInjectionGenerator.ParseMethodModel.cs Modified the condition that triggers the mixed attribute error diagnostic.
ServiceScan.SourceGenerator.Tests/CustomHandlerTests.cs Added new tests to validate behavior when applying multiple CustomHandler attributes.

@Dreamescaper Dreamescaper merged commit cd06055 into main May 19, 2025
1 check passed
@Dreamescaper Dreamescaper deleted the allow-multiple-custom-handler-attributes branch May 19, 2025 11:12
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.

2 participants