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

Don't discard comments in suggested fixes #597

Open
dominikh opened this issue Sep 25, 2019 · 0 comments
Open

Don't discard comments in suggested fixes #597

dominikh opened this issue Sep 25, 2019 · 0 comments
Labels

Comments

@dominikh
Copy link
Owner

To compute edits for suggested fixes, we create replacement AST nodes and format them. Unfortunately, since comments aren't attached to AST nodes directly, this means that many suggested fixes will discard comments. This occurs whenever the range we're replacing contained comments, for example when manipulating the arguments in a function call, or replacing an IfStmt with just its body.

@dominikh dominikh added the bug label Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant