Skip to content
This repository has been archived by the owner on Oct 16, 2018. It is now read-only.

Continuation indent for parameter lists #37

Closed
yole opened this issue Nov 17, 2017 · 3 comments
Closed

Continuation indent for parameter lists #37

yole opened this issue Nov 17, 2017 · 3 comments

Comments

@yole
Copy link

yole commented Nov 17, 2017

The current Google style guide requires 8-space indent for wrapped function parameter lists: https://android.github.io/kotlin-guides/style.html#functions

In our style guide, we'd really prefer to require 4-space indents. The reason why 4-space indents work better is primary constructor parameters: we really want to have the same indent for val/var properties defined in the primary constructor and in the body of the class. And to separate the parameters from the body, the wrapped closing parenthesis followed by the opening curly brace (which your current example already shows) works well enough.

Is there any strong reason why you prefer 8-space indents? If not, could you change the guidance?

@JakeWharton
Copy link
Contributor

I absolutely prefer 4. I don't have notes as to why we picked 8. I have a fuzzy memory that the preview version of your style guide said 4 or 8 and we probably just picked one to avoid the "or".

@lub0s
Copy link

lub0s commented Jan 11, 2018

Since JB also released their guidlines could this be looked into and unified into 4 spaces probably ?

@JakeWharton
Copy link
Contributor

JakeWharton commented Jan 11, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants