Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

#359 - No Hanging Indentation#725

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
baweaver wants to merge1 commit intorubocop:master
base:master
Choose a base branch
Loading
frombaweaver:patch-2

Conversation

baweaver
Copy link

Based off of a very old issue that had a lot of interesting discussion:

#359

The idea here is that hanging indentation is incredibly hard to read while going down a page, and also incurs extra editing whenever more methods are added to a chain.

Yurokle, joelip, deager, dzader, matthewalbani, sferik, havenwood, ahcarpenter, hammerdr, kkuchta, and 5 more reacted with thumbs up emoji
Based off of a very old issue that had a lot of interesting discussion:rubocop#359The idea here is that hanging indentation is incredibly hard to read while going down a page, and also incurs extra editing whenever more methods are added to a chain.

```ruby
# bad (hanging indent)
some_method.with.a_longer.chain(:parameter_1,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think this needs to be made clear with respect to:

  1. no method chain - e.g. some_method(a,
  2. short method chain - frankly it seems to the example you deleted looks fine, as it's not really a long method chain.

@@ -643,6 +635,40 @@ Translations of the guide are available in the following languages:
end
```

* <a name="no-hanging-indent"></a>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Maybeno-hanging-param-indent or something like this?

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

@bbatsovbbatsovbbatsov left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@baweaver@bbatsov

[8]ページ先頭

©2009-2025 Movatter.jp