Skip to content

Don’t report no-op rename edits #1230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2024

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented May 7, 2024

When renaming func test(foo: Int) {} to test2(foo:), rename used to report an edit from foo to foo, which clutters the refactor preview view. We shouldn’t report edits if no text is actually changed.

rdar://127291815

@ahoppen ahoppen requested a review from bnbarham May 7, 2024 00:44
@ahoppen ahoppen requested a review from benlangmuir as a code owner May 7, 2024 00:44
@ahoppen ahoppen force-pushed the no-noop-rename-edits branch from fd18714 to 55373e6 Compare May 7, 2024 00:47
@ahoppen
Copy link
Member Author

ahoppen commented May 7, 2024

@swift-ci Please test

When renaming `func test(foo: Int) {}` to `test2(foo:)`, rename used to report an edit from `foo` to `foo`, which clutters the refactor preview view. We shouldn’t report edits if no text is actually changed.

rdar://127291815
@ahoppen ahoppen force-pushed the no-noop-rename-edits branch from 55373e6 to 30459c7 Compare May 7, 2024 04:37
@ahoppen
Copy link
Member Author

ahoppen commented May 7, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented May 7, 2024

@swift-ci Please test Windows

@ahoppen ahoppen merged commit 624d4b6 into swiftlang:main May 7, 2024
3 checks passed
@ahoppen ahoppen deleted the no-noop-rename-edits branch May 7, 2024 14: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