Skip to content

Conversation

@viceroypenguin
Copy link
Member

Fixes #251

@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

❌ Patch coverage is 0% with 42 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...CodeFixes/HandlerMethodMustExistCodeFixProvider.cs 0.00% 42 Missing ⚠️
Files with missing lines Coverage Δ
...CodeFixes/HandlerMethodMustExistCodeFixProvider.cs 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

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 enhances the HandlerMethodMustExistCodeFixProvider to generate more accurate HandleAsync methods by detecting the response type and adjusting method signatures based on class modifiers.

Key changes:

  • Code fix now detects Response records and uses them as the return type instead of always defaulting to int
  • Method modifiers are conditionally generated based on whether the handler class is static
  • Parameter names are generated using camelCase conversion of the request type instead of always using _

Reviewed Changes

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

File Description
HandlerMethodMustExistCodeFixProvider.cs Enhanced to detect Response type, conditionally add static modifier, and generate camelCase parameter names from request types
HandlerMethodMustExistCodeFixProviderTests.cs Renamed existing test and added new test case for sealed class scenario to validate Response type detection
Tests.HandleMethodIsCorrectWithIntReturn.cs Updated expected diagnostic marker to reflect corrected analyzer behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@viceroypenguin viceroypenguin merged commit 41c7f50 into master Oct 31, 2025
8 checks passed
@viceroypenguin viceroypenguin deleted the codefix branch October 31, 2025 16:04
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.

CodeFix for Missing HandleAsync() should respect static/sealed of class

2 participants