Skip to content

Conversation

CyrusNajmabadi
Copy link
Member

No description provided.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner June 27, 2025 19:11
using Microsoft.CodeAnalysis.Formatting;
using Microsoft.CodeAnalysis.Shared.Extensions;

namespace Microsoft.CodeAnalysis.RemoveUnnecessaryImports;

internal abstract class AbstractRemoveUnnecessaryImportsCodeFixProvider : CodeFixProvider
internal abstract class AbstractRemoveUnnecessaryImportsCodeFixProvider : SyntaxEditorBasedCodeFixProvider
Copy link
Member Author

Choose a reason for hiding this comment

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

this allows the fixer to work on individual documents in parallel. It doesn't need to run them serially.

// We don't need to perform any cleanup for this code fix. It simply removes code, leaving
// things in the state it already needs to be in.
protected override CodeActionCleanup Cleanup => CodeActionCleanup.None;
#endif
Copy link
Member Author

Choose a reason for hiding this comment

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

this ensures that after the fixer runs, the Code Action system itself doesn't do an full semantic pass on the resultant documents to clean them up.

@CyrusNajmabadi CyrusNajmabadi enabled auto-merge June 27, 2025 21:18
@CyrusNajmabadi CyrusNajmabadi merged commit 4a5ff47 into dotnet:main Jun 27, 2025
25 of 26 checks passed
@CyrusNajmabadi CyrusNajmabadi deleted the removeImportsPerf branch June 27, 2025 22:26
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jun 27, 2025
@RikkiGibson RikkiGibson modified the milestones: Next, 18.0 P1 Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants