Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Jun 8, 2023

Rubocop challenge!

Layout/SpaceAroundEqualsInParameterDefault

Safe autocorrect: Yes
✅ The autocorrect a cop does is safe (equivalent) by design.

Description

Overview

Checks that the equals signs in parameter default assignments
have or don't have surrounding space depending on configuration.

Examples

EnforcedStyle: space (default)

# bad
def some_method(arg1=:default, arg2=nil, arg3=[])
  # do something...
end

# good
def some_method(arg1 = :default, arg2 = nil, arg3 = [])
  # do something...
end

EnforcedStyle: no_space

# bad
def some_method(arg1 = :default, arg2 = nil, arg3 = [])
  # do something...
end

# good
def some_method(arg1=:default, arg2=nil, arg3=[])
  # do something...
end

Auto generated by rubocop_challenger

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

Development

Successfully merging this pull request may close these issues.

1 participant