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

Introduce RuboCop::Ast::MethodDispatchNode#selector #267

Merged

Commits on May 31, 2023

  1. Introduce RuboCop::Ast::MethodDispatchNode#selector

    If you need to manipulate the call-site of a method dispatch, you have
    to use node.loc.selector for regular methods and node.loc.keyword for
    syntax nodes that behave like method invocations, but are not. Super and
    yield nodes are an example of that.
    
    This forces us to check if node.loc responds to #keyword in a few places
    in rubocop proper and we can make it easier if we expose a method, here
    I have called it #selector, to all method dispatch nodes and work with
    it.
    gsamokovarov committed May 31, 2023
    Configuration menu
    Copy the full SHA
    60fc80e View commit details
    Browse the repository at this point in the history