Skip to content

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
@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.

4 participants