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

[Fix #7549] Add Style/ArgumentsForwarding cop #7646

Merged
merged 1 commit into from Oct 22, 2020

Commits on Oct 22, 2020

  1. [Fix rubocop#7549] Add Style/ArgumentsForwarding cop

    Closes rubocop#7549.
    
    This PR adds `Style/ArgumentsForwarding` cop.
    
    As shown at rubocop#7549, the following code is unsafe to be
    arguments forwarding.
    
    ```ruby
    def foo(*args)
      bar(*args)
    end
    ```
    
    So by setting `AllowOnlyRestArgument` configuration option to true by default,
    This PR makes the cop safe by default.
    koic committed Oct 22, 2020
    Configuration menu
    Copy the full SHA
    5f75bac View commit details
    Browse the repository at this point in the history