Skip to content

[SwiftSyntaxCodeActions] Move SwiftRefactor code actions in from swift-syntax#2671

Open
25harsh wants to merge 1 commit into
swiftlang:mainfrom
25harsh:move-refactor-code-actions-in
Open

[SwiftSyntaxCodeActions] Move SwiftRefactor code actions in from swift-syntax#2671
25harsh wants to merge 1 commit into
swiftlang:mainfrom
25harsh:move-refactor-code-actions-in

Conversation

@25harsh
Copy link
Copy Markdown
Contributor

@25harsh 25harsh commented May 27, 2026

Moved SyntaxRefactoringProvider types mentioned in #2639 out of swift-syntax and intoSources/SwiftSyntaxCodeActions/.
Made access specifier changes and dependency changes.

Companion PR #3345

Notes:

  1. Removed compiler(>=6) checks

  2. Ported helpers from Sources/SwiftRefactor/SyntaxUtils.swift to Sources/SwiftSyntaxCodeActions/SyntaxRefactoringCodeActionProvider.swift

  3. Test cases are yet to be moved.
    RemoveSeparatorsFromIntegerLiteral, RemoveRedundantParentheses andConvertStoredPropertyToComputed need coverage. (follow-on PRs)

  4. Helpers moved DeclModifierRemover & IntegerLiteralUtilities

Copy link
Copy Markdown
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, @25harsh. I have two requests:

  • Could you ensure that each file has a trailing newline and that they pass the swift-format check as described in CONTRIBUTING.md?
  • Could you also migrate the tests to SourceKit-LSP. If they need some adjustment, that’s fine. I just don’t want to add the refactoring actions here without test coverage.

@25harsh 25harsh closed this May 27, 2026
@25harsh 25harsh force-pushed the move-refactor-code-actions-in branch from 0ae609b to 8e8a6ce Compare May 27, 2026 15:25
@25harsh 25harsh reopened this May 27, 2026
@25harsh
Copy link
Copy Markdown
Contributor Author

25harsh commented May 27, 2026

@ahoppen all changes are done, overloaded assertRefactor for SyntaxRefactoringProvider that accepts some SyntaxProtocol for input and expected to avoid ambiguity

@25harsh 25harsh requested a review from ahoppen May 28, 2026 17:53
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