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

Style/MethodDefParentheses doesn't support mix #1729

Closed
zenspider opened this issue Mar 21, 2015 · 1 comment
Closed

Style/MethodDefParentheses doesn't support mix #1729

zenspider opened this issue Mar 21, 2015 · 1 comment

Comments

@zenspider
Copy link

OK. I came across an actual conflict. "Seattle-Style" eschews parens on method declarations unless the args span multiple lines:

  def self.pie_chart(diameter, pct_green,
                     good_color = PNG::Color::Green,
                     bad_color = PNG::Color::Red)

This is usually only when there are long names or defaults that cause the declaration to go over 80 chars.

The defaults are currently:

Style/MethodDefParentheses:
  EnforcedStyle: require_parentheses
  SupportedStyles:
    - require_parentheses
    - require_no_parentheses

but could use another, called require_no_parethesis_except_multiline or something.

@bbatsov
Copy link
Collaborator

bbatsov commented Mar 29, 2015

Sounds reasonable to me.

alexdowad added a commit to alexdowad/rubocop that referenced this issue Nov 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants