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

Multiline*BraceLayout should have option to always force closing onto the next line #2857

Closed
ptarjan opened this issue Feb 16, 2016 · 0 comments

Comments

@ptarjan
Copy link
Contributor

ptarjan commented Feb 16, 2016

With this config

Style/MultilineArrayBraceLayout:
  Enabled: true
Style/MultilineHashBraceLayout:
  Enabled: true
Style/MultilineMethodCallBraceLayout:
  Enabled: true
Style/MultilineMethodDefinitionBraceLayout:
  Enabled: true

I'd like to have our closing ) or } or ] always on a newline, but still allow the initial arg to be on the same line.

Alternatively an equivilent rule to Style/First*LineBreak but for the closing things would work.

/cc @panthomakos

panthomakos added a commit to panthomakos/rubocop that referenced this issue Apr 13, 2016
The `Style/Multiline*BraceLayout` cops now support two configuration
styles. The `symmetrical` option is the default in which the closing
brace mirrors the open brace. The `new_line` option forces the closing
brace to always be on a new line.

* I have clarified the descriptions and comments for all of the cops.
* I have moved the common specs into a shared example that constructs
  the source code for each test using some simple input: the opening
  brace, closing brace, and literal elements.
Neodelf pushed a commit to Neodelf/rubocop that referenced this issue Oct 15, 2016
The `Style/Multiline*BraceLayout` cops now support two configuration
styles. The `symmetrical` option is the default in which the closing
brace mirrors the open brace. The `new_line` option forces the closing
brace to always be on a new line.

* I have clarified the descriptions and comments for all of the cops.
* I have moved the common specs into a shared example that constructs
  the source code for each test using some simple input: the opening
  brace, closing brace, and literal elements.
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