kotlin-guides icon indicating copy to clipboard operation
kotlin-guides copied to clipboard

Standardize positions of closing parentheses

Open sgrimm-sg opened this issue 7 years ago • 1 comments
trafficstars

The style guide is currently silent about which of these is preferred:

someFunction(
    someOtherFunction(
        someThirdFunction(
            param1,
            param2,
            param3)))
someFunction(
    someOtherFunction(
        someThirdFunction(
            param1,
            param2,
            param3
        )
    )
)

The Google Java style guide mandates the first style and it'd be great if the Kotlin style guide was similarly specific. Doesn't matter to me which of the two styles it settles on, just that it picks one for consistency.

sgrimm-sg avatar Apr 11 '18 14:04 sgrimm-sg

The JetBrains style guide (https://kotlinlang.org/docs/reference/coding-conventions.html) likes the second. (I've come to like it as well.)

NightlyNexus avatar Apr 11 '18 21:04 NightlyNexus