Option to use normal indent in chained calls
#KT-18605 Fixed
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
class Some {
|
||||
fun some(): Some? = this
|
||||
}
|
||||
|
||||
public fun bar(): String? =
|
||||
Some()
|
||||
?.some()
|
||||
?.some()
|
||||
?.some()!!
|
||||
.toString()
|
||||
|
||||
// SET_TRUE: CONTINUATION_INDENT_FOR_CHAINED_CALLS
|
||||
@@ -9,3 +9,4 @@ public fun bar(): String? =
|
||||
?.some()!!
|
||||
.toString()
|
||||
|
||||
// SET_TRUE: CONTINUATION_INDENT_FOR_CHAINED_CALLS
|
||||
|
||||
@@ -9,3 +9,4 @@ Some()
|
||||
?.some()!!
|
||||
.toString()
|
||||
|
||||
// SET_TRUE: CONTINUATION_INDENT_FOR_CHAINED_CALLS
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
val x = "abc"
|
||||
.length
|
||||
|
||||
// SET_TRUE: CONTINUATION_INDENT_FOR_CHAINED_CALLS
|
||||
@@ -0,0 +1,4 @@
|
||||
val x = "abc"
|
||||
.length
|
||||
|
||||
// SET_TRUE: CONTINUATION_INDENT_FOR_CHAINED_CALLS
|
||||
@@ -0,0 +1,4 @@
|
||||
val x = "abc"
|
||||
.length
|
||||
|
||||
// SET_TRUE: CONTINUATION_INDENT_FOR_CHAINED_CALLS
|
||||
@@ -0,0 +1,46 @@
|
||||
import java.util.ArrayList
|
||||
|
||||
fun test() {
|
||||
val abc = ArrayList<Int>()
|
||||
.map {
|
||||
it * 2
|
||||
}
|
||||
.filter {
|
||||
it > 4
|
||||
}
|
||||
}
|
||||
|
||||
fun test1() {
|
||||
val abc = ArrayList<Int>()
|
||||
.map({
|
||||
it * 2
|
||||
})
|
||||
.filter({
|
||||
it > 4
|
||||
})
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
val abc = ArrayList<Int>()
|
||||
.map {
|
||||
it * 2
|
||||
}
|
||||
}
|
||||
|
||||
fun test3() {
|
||||
val abc = ArrayList<Int>().map {
|
||||
it * 2
|
||||
}
|
||||
}
|
||||
|
||||
fun testWithComments() {
|
||||
val abc = ArrayList<Int>()
|
||||
// .map {
|
||||
// it * 2
|
||||
// }
|
||||
.filter {
|
||||
it > 4
|
||||
}
|
||||
}
|
||||
|
||||
// SET_TRUE: CONTINUATION_INDENT_FOR_CHAINED_CALLS
|
||||
@@ -43,3 +43,4 @@ fun testWithComments() {
|
||||
}
|
||||
}
|
||||
|
||||
// SET_TRUE: CONTINUATION_INDENT_FOR_CHAINED_CALLS
|
||||
|
||||
@@ -42,3 +42,5 @@ fun testWithComments() {
|
||||
it > 4
|
||||
}
|
||||
}
|
||||
|
||||
// SET_TRUE: CONTINUATION_INDENT_FOR_CHAINED_CALLS
|
||||
|
||||
Reference in New Issue
Block a user