Skip to content
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

Improve rename refactoring name check #533

Merged
merged 3 commits into from
Nov 27, 2024

Conversation

toinehartman
Copy link
Contributor

This PR improves the user experience when trying to rename to an invalid name.

  • Before checking the validity of the new name based on the type of declarations, perform a quick check based on only the location in the parse tree. Since this does not require any type information, this can be performed early and efficiently, informing the user as soon as possible when the renaming will not succeed.
  • Fix the type of exceptions thrown by the rename refactoring, so VS Code shows it once (instead of twice).

Closes #517.

@toinehartman toinehartman added the bug Something isn't working label Nov 27, 2024
@toinehartman toinehartman self-assigned this Nov 27, 2024
Copy link

sonarcloud bot commented Nov 27, 2024

@toinehartman toinehartman merged commit 0a8f478 into main Nov 27, 2024
13 checks passed
@toinehartman toinehartman deleted the fix/rename-refactoring/invalid-name-check branch November 27, 2024 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Renaming UX for invalid identifiers
2 participants