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

Add new Style/KeywordParametersOrder cop #8563

Merged
merged 1 commit into from
Aug 22, 2020

Conversation

fatkodima
Copy link
Contributor

Related rubocop/ruby-style-guide#771

This cop enforces that optional keyword arguments are placed at the end of the arguments list.

# bad
def some_method(first: false, second:, third: 10)
  # body omitted
end

# good
def some_method(second:, first: false, third: 10)
  # body omitted
end

@fatkodima fatkodima changed the title Add new Style/KeywordArgumentsOrder cop Add new Style/KeywordParametersOrder cop Aug 20, 2020
@bbatsov bbatsov merged commit 89ed15d into rubocop:master Aug 22, 2020
@bbatsov
Copy link
Collaborator

bbatsov commented Aug 22, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants