-
Notifications
You must be signed in to change notification settings - Fork 196
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
Go comments not being cleaned up correctly #376
Comments
Hey! Thanks a lot for reporting this. |
thanks for pinging me, @ketkarameya. Thanks for the detailed report, @conormurray95! I'll try to look closer into this in the upcoming days. Hopefully, I can pinpoint a cause. |
@conormurray95 can you check this branch |
Hey @ketkarameya apologies I just got a chance to look back at this, that pr looks good and solves the cases I'd spotted. Thanks! |
Issue
When running the tool with cleanup_comments = true against a go codebase I'm seeing some inconsistent behaviour around comment cleanup.
Steps to reproduce
I've added test cases demonstrating this issue in this pr #375
Observations:
The test cases provided in the pr are for cleaning up if blocks however I've noticed the same behaviour when cleaning up constants in my own codebase e.g.
Before
After
Expected
The constants example above exhibits the same behaviour around only cleaning up comments if they're (a) multiline or (b) have another comment node directly above them.
Any context on if this is a known issue in other languages or seems go specific etc would be great. It's the one piece left stopping autogenerated pr's we have being able to be directly merged.
The text was updated successfully, but these errors were encountered: