Skip to content

:RInlineTemp substitutes variable names in comments #50

Description

@mcary

Thanks for taking a stab at this refactoring plugin, @ecomba.

When I have comments within the method talking about domain concepts, the temp variable's value gets inlined there as well:

def foo
  user = User.find
  # Update the user's timestamp?
  user.save!
end

with cursor on user = ..., when I run :RInlineTemp, I get:

def foo
  # Update the User.find's timestamp?
  User.find.save!
end

Note how the comment was altered.

I would like comments to not be updated. In some cases where the comment is actually code, it could make sense, but generally I don't think the refactoring tools should manipulate comments.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions