Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up#359 - No Hanging Indentation #725
Open
Conversation
|
||
```ruby | ||
# bad (hanging indent) | ||
some_method.with.a_longer.chain(:parameter_1, |
This comment has been minimized.
This comment has been minimized.
bbatsov
Aug 16, 2018
Collaborator
I think this needs to be made clear with respect to:
- no method chain - e.g. some_method(a,
- 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> |
This comment has been minimized.
This comment has been minimized.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
baweaver commentedAug 15, 2018
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.