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

remove comments from same line #195

Merged
merged 2 commits into from
Oct 19, 2023
Merged

remove comments from same line #195

merged 2 commits into from
Oct 19, 2023

Conversation

joanvr
Copy link
Contributor

@joanvr joanvr commented Oct 18, 2023

What's changed?

Removing comments attached to next statement (or end of enclosing class) when removing a variable declarations, that "belongs" to our statement because it has no new line between the statement and the comment.

What's your motivation?

When removing unused private fields, the comment seems to get "attached" to the previous statement.
Closes https://github.com/moderneinc/support-app/issues/15

Anything in particular you'd like reviewers to focus on?

Corner cases not taken into consideration where we should not remove the comment

Anyone you would like to review specifically?

@knutwannheden @timtebeek

Have you considered any alternatives or workarounds?

Maybe getting the next statement with cursors instead of storing it in a structure when traversing the list

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've added the license header to any new files through ./gradlew licenseFormat
  • I've used the IntelliJ IDEA auto-formatter on affected files

@joanvr joanvr added bug Something isn't working enhancement New feature or request labels Oct 18, 2023
@joanvr joanvr self-assigned this Oct 18, 2023
@joanvr joanvr merged commit 3c93ea7 into main Oct 19, 2023
1 check passed
@joanvr joanvr deleted the fix/remove-comments branch October 19, 2023 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants