-
Notifications
You must be signed in to change notification settings - Fork 731
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
Code fixes should not change comments and white spaces #9999
Comments
@shenglol It's really hard to follow the gif. I'm assuming your issue with the location parameter fix is that the comment is copied as well as the value into the parameter default value? If there's a second issue in the gif, it's too fast to follow, could you please create a separate issue for it? Thx. |
@StephenWeatherford I just realized that it's not just one or two cases but a general issue. Basically, most of our code fixes are affected. The issue is that when we create text replacements, we didn't take into account the fact that the syntax being removed / replaced may have leading, trailing or enclosed comments. As a result, the comments may get removed or duplicated. You can easily reproduce it by applying code fixes to a syntax node with leading or trailing comments. We may need to review all the places where |
See examples below:
The text was updated successfully, but these errors were encountered: