-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Enforce strict 2 space indentation for multiline method invocation as well as multiline hash definitions #1744
Comments
The NOT OKAY hash examples that you give are already reported as offenses with the default configuration. This is because the first key/value pair is preceded by a line break. If you change it to user_alpha_beta_gamma = { name: "John Doe",
email: "john@example",
role: :admin } it passes inspection. For the same reason, all the method call examples pass. What you're talking about is to require line break before the first parameter or element. This could of course be added, either to existing cops as configuration options, or as new cops. |
Maintainers, do you want configuration options added for this style? If yes, I'll add them. If no, then let's close this issue. |
I think we now have a cop that does this (but it's disabled by default). There isn't any work to be done here. |
I haven't found it. Any help? |
I'm trying to get that enforced but did not find any way ... dug though https://github.com/rubocop-hq/rubocop/blob/master/config/default.yml and nothing seems to work. |
Yes, I should not have linked to |
This is a question and not an issue. I am posting it here as I don't know where else to ask. I have already checked existing issues based on keyword search but couldn't seem to find any issue related to this.
Is it possible to enforce a consistent 2 space indentation for multiline method calls and multiline hash definition?
I have created a sample code to explain my concern.
Is there a way I can enforce a strict 2 space indentation scheme?
The text was updated successfully, but these errors were encountered: