Skip to content

Conversation

viceroypenguin
Copy link
Member

Fixes #227

@viceroypenguin viceroypenguin requested a review from Copilot August 22, 2025 21:28
Copilot

This comment was marked as outdated.

Copy link

codecov bot commented Aug 22, 2025

Codecov Report

❌ Patch coverage is 86.79245% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...eFixes/StaticToSealedHandlerRefactoringProvider.cs 87.37% 6 Missing and 7 partials ⚠️
src/Common/SyntaxExtensions.cs 66.66% 0 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
src/Common/ITypeSymbolExtensions.cs 85.71% <ø> (ø)
src/Common/SyntaxExtensions.cs 66.66% <66.66%> (ø)
...eFixes/StaticToSealedHandlerRefactoringProvider.cs 87.37% <87.37%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@viceroypenguin viceroypenguin requested a review from Copilot August 22, 2025 21:38
Copy link

@Copilot 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 implements a basic refactoring feature that converts static handler classes to sealed instance handlers, supporting issue #227. The refactoring automatically transforms static handlers with dependency injection parameters into sealed classes with primary constructors.

  • Adds code refactoring capability to convert static handler classes to sealed instance handlers
  • Implements automated parameter transformation from method dependencies to class constructor parameters
  • Includes comprehensive test coverage for various refactoring scenarios

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/Immediate.Handlers.Tests/Immediate.Handlers.Tests.csproj Adds CodeRefactoring.Testing package reference for test infrastructure
tests/Immediate.Handlers.Tests/CodeFixTests/StaticToSealedHandlerRefactoringProviderTests.cs Comprehensive test suite covering refactoring scenarios including class/method triggers and dependency handling
tests/Immediate.Handlers.Tests/CodeFixTests/HandlerMethodMustExistCodeFixProviderTests.cs Renames test class for clarity and consistency
tests/Immediate.Handlers.Tests/CodeFixTests/CodeRefactoringTestHelper.cs Test helper utility for code refactoring test infrastructure
src/Immediate.Handlers.CodeFixes/StaticToSealedHandlerRefactoringProvider.cs Main refactoring provider implementing static-to-sealed transformation logic
src/Immediate.Handlers.CodeFixes/RefactoringExtensions.cs Extension methods for refactoring context and document operations
src/Common/SyntaxExtensions.cs Utility method for CancellationToken type detection
src/Common/ITypeSymbolExtensions.cs Makes IsCancellationToken method nullable-aware
Directory.Packages.props Adds CodeRefactoring.Testing package version specification

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

Add code-fix to translate old-form to new-form

1 participant