Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Default continuation indent for Android should be 8 not 4 #120

Closed
MyDogTom opened this issue Dec 4, 2017 · 6 comments
Closed

Default continuation indent for Android should be 8 not 4 #120

MyDogTom opened this issue Dec 4, 2017 · 6 comments

Comments

@MyDogTom
Copy link
Contributor

MyDogTom commented Dec 4, 2017

This commit changes continuation indent from 8 to 4.
According to Android Kotlin style guide it should be 8.
I guess confusion comes from android/kotlin-guides#37. But that issue is about usage of "indent" instead of "continuation indent" for parameter list. Not about changing the size of continuation indent.

@MyDogTom MyDogTom changed the title Default continuation indent for Android should be 8 not4 Default continuation indent for Android should be 8 not 4 Dec 4, 2017
@shyiko
Copy link
Collaborator

shyiko commented Dec 4, 2017

@MyDogTom right. Thanks for pointing it out.

@vanniktech
Copy link
Contributor

I think this was recently changed to be 4.

They wanted to have the fields in classes aligned with everything else and hence they made that change. android/kotlin-guides#37

@shyiko
Copy link
Collaborator

shyiko commented Dec 16, 2017

@vanniktech see latest https://github.com/android/kotlin-guides/blob/master/style.md#continuation-indent. @MyDogTom is right. Android Kotlin Style Guide prescribes +8 continuation indentation (+4 for parameters).

bradmcmanus added a commit to bradmcmanus/ktlint that referenced this issue Jan 3, 2018
This reverts commit ed26117.

As per discussion from the GitHub issue [1], the default continuation
indent should be 8 rather than 4. This matches the Android Kotlin style
guide.

[1] pinterest#120
bradmcmanus added a commit to bradmcmanus/ktlint that referenced this issue Jan 3, 2018
This reverts commit ed26117.

As per discussion from the GitHub issue [1], the default continuation
indent for Android should be 8 rather than 4. This matches the Android
Kotlin style guide.

[1] pinterest#120
@scottkennedy
Copy link

"Android Kotlin Style Guide prescribes +8 continuation indentation (+4 for parameters)."

Is there a way to specify that in IntelliJ / Android Studio? The "continuation indent" setting seems to control both.

@shyiko
Copy link
Collaborator

shyiko commented Feb 28, 2018

@scottkennedy see #134 (comment)

@shyiko
Copy link
Collaborator

shyiko commented Feb 12, 2019

#308

@shyiko shyiko closed this as completed Feb 12, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants