diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/SmartEnterCompletionTest.kt b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/SmartEnterCompletionTest.kt index cf3c9d022a9..75cdc20da59 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/SmartEnterCompletionTest.kt +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/SmartEnterCompletionTest.kt @@ -115,8 +115,10 @@ class SmartEnterCompletionTest : KotlinLightCodeInsightFixtureTestCase() { fun foo(p:Int) {} fun test() { - foo(1 + - 2) + foo( + 1 + + 2, + ) } """ ) diff --git a/idea/idea-live-templates/testData/anonymous_1.exp.kt b/idea/idea-live-templates/testData/anonymous_1.exp.kt index 2349d4dad4d..a3b15370bef 100644 --- a/idea/idea-live-templates/testData/anonymous_1.exp.kt +++ b/idea/idea-live-templates/testData/anonymous_1.exp.kt @@ -1,9 +1,11 @@ import javax.swing.SwingUtilities fun main(args : Array) { - SwingUtilities.invokeLater(object : Runnable { - override fun run() { - TODO("Not yet implemented") - } - }) + SwingUtilities.invokeLater( + object : Runnable { + override fun run() { + TODO("Not yet implemented") + } + }, + ) } diff --git a/idea/idea-live-templates/testData/anonymous_2.exp.kt b/idea/idea-live-templates/testData/anonymous_2.exp.kt index cdc6ddbf363..8705d3eb916 100644 --- a/idea/idea-live-templates/testData/anonymous_2.exp.kt +++ b/idea/idea-live-templates/testData/anonymous_2.exp.kt @@ -1,7 +1,9 @@ import javax.swing.SwingUtilities fun main(args : Array) { - SwingUtilities.invokeLater(object : Thread() { - - }) + SwingUtilities.invokeLater( + object : Thread() { + + }, + ) } diff --git a/idea/testData/copyPaste/conversion/SeveralMethodsSample.expected.kt b/idea/testData/copyPaste/conversion/SeveralMethodsSample.expected.kt index 649ddd64433..c5a344dd002 100644 --- a/idea/testData/copyPaste/conversion/SeveralMethodsSample.expected.kt +++ b/idea/testData/copyPaste/conversion/SeveralMethodsSample.expected.kt @@ -14,7 +14,7 @@ class A { return JetBundle.message( "x.in.y", DescriptorRenderer.COMPACT.render(declarationDescriptor), - IdeDescriptorRenderers.SOURCE_CODE_SHORT_NAMES_NO_ANNOTATIONS.render(containingDescriptor) + IdeDescriptorRenderers.SOURCE_CODE_SHORT_NAMES_NO_ANNOTATIONS.render(containingDescriptor), ) } } diff --git a/idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToStringWithReferenceAndComment.kt.after b/idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToStringWithReferenceAndComment.kt.after index c0127ebc9f3..dae575c94bb 100644 --- a/idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToStringWithReferenceAndComment.kt.after +++ b/idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToStringWithReferenceAndComment.kt.after @@ -4,9 +4,8 @@ val x = listOf(1, 2, 3).joinToString( // comment2 prefix = "= ", // comment3 - separator = " + " + separator = " + ", // comment4 - , // comment1 - transform = Int::toString + transform = Int::toString, ) \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToWithComment.kt.after b/idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToWithComment.kt.after index 9867ff5243c..b30afeee5c0 100644 --- a/idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToWithComment.kt.after +++ b/idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToWithComment.kt.after @@ -7,6 +7,6 @@ val x = listOf(1, 2, 3).joinTo( // comment2 prefix = "= ", // comment3 - separator = " + " + separator = " + ", // comment4 ) { "$it*$it" } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/collections/simplifiableCallChain/listOfNotNullWithComment.kt.after b/idea/testData/inspectionsLocal/collections/simplifiableCallChain/listOfNotNullWithComment.kt.after index 07514a76345..9c07b9f1ece 100644 --- a/idea/testData/inspectionsLocal/collections/simplifiableCallChain/listOfNotNullWithComment.kt.after +++ b/idea/testData/inspectionsLocal/collections/simplifiableCallChain/listOfNotNullWithComment.kt.after @@ -3,6 +3,6 @@ fun test() { listOfNotNull( true, // comment1 - null // comment2 + null, // comment2 ).first() } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/complexRedundantLet/callChainWithLineBreak.kt.after b/idea/testData/inspectionsLocal/complexRedundantLet/callChainWithLineBreak.kt.after index deb1d311d36..58bc1699d4f 100644 --- a/idea/testData/inspectionsLocal/complexRedundantLet/callChainWithLineBreak.kt.after +++ b/idea/testData/inspectionsLocal/complexRedundantLet/callChainWithLineBreak.kt.after @@ -2,6 +2,8 @@ // HIGHLIGHT: INFORMATION fun test(list: List) { - println(list.filter { it > 1 } - .filter { it > 2 }) + println( + list.filter { it > 1 } + .filter { it > 2 } + ) } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/complexRedundantLet/multipleLines.kt.after b/idea/testData/inspectionsLocal/complexRedundantLet/multipleLines.kt.after index f709f269822..a7c2d18702e 100644 --- a/idea/testData/inspectionsLocal/complexRedundantLet/multipleLines.kt.after +++ b/idea/testData/inspectionsLocal/complexRedundantLet/multipleLines.kt.after @@ -2,7 +2,9 @@ // HIGHLIGHT: INFORMATION fun test() { - println(runCatching { + println( + runCatching { /* lots of code*/ - }) + } + ) } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/constantConditionIf/expression.kt.after b/idea/testData/inspectionsLocal/constantConditionIf/expression.kt.after index c0e4ab06db7..3b68ed8e02d 100644 --- a/idea/testData/inspectionsLocal/constantConditionIf/expression.kt.after +++ b/idea/testData/inspectionsLocal/constantConditionIf/expression.kt.after @@ -3,9 +3,11 @@ fun foo(x: Int) {} fun bar() { - foo(run { - foo(1) - foo(2) - 1 - }) + foo( + run { + foo(1) + foo(2) + 1 + } + ) } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/argumentAndFunction.kt.after b/idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/argumentAndFunction.kt.after index 8622c1c606e..9e7554158e5 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/argumentAndFunction.kt.after +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/argumentAndFunction.kt.after @@ -3,9 +3,12 @@ fun test() { operator fun get(a: Int, b: Int, fn: (i: Int) -> Int) : Int = 0 } val test = Test() - test[1, 2, { i -> - i - }] + test[ + 1, 2, + { i -> + i + } + ] } fun withSuppression() { diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/functionalArgument.kt.after b/idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/functionalArgument.kt.after index e714c132780..1e56793eda5 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/functionalArgument.kt.after +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/functionalArgument.kt.after @@ -3,7 +3,9 @@ fun test() { operator fun get(fn: (i: Int) -> Int) : Int = 0 } val test = Test() - test[{ i -> - i - }] + test[ + { i -> + i + } + ] } diff --git a/idea/testData/inspectionsLocal/redundantSamConstructor/simple.kt.after b/idea/testData/inspectionsLocal/redundantSamConstructor/simple.kt.after index cb36a0a8b58..c161c1a5074 100644 --- a/idea/testData/inspectionsLocal/redundantSamConstructor/simple.kt.after +++ b/idea/testData/inspectionsLocal/redundantSamConstructor/simple.kt.after @@ -1,5 +1,7 @@ fun test() { - Foo.Bar().bar({ - true - }) + Foo.Bar().bar( + { + true + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/branched/doubleBangToIfThen/exceptionTextHandlesMultiline.kt.after b/idea/testData/intentions/branched/doubleBangToIfThen/exceptionTextHandlesMultiline.kt.after index 62e01fdfc46..c3c7ef0a73a 100644 --- a/idea/testData/intentions/branched/doubleBangToIfThen/exceptionTextHandlesMultiline.kt.after +++ b/idea/testData/intentions/branched/doubleBangToIfThen/exceptionTextHandlesMultiline.kt.after @@ -1,8 +1,10 @@ // WITH_RUNTIME fun main(args: Array) { - val doSomething = doSomething("one" + 1, + val doSomething = doSomething( + "one" + 1, "two", - 3 * 4) + 3 * 4 + ) val t = if (doSomething != null) doSomething else throw NullPointerException("Expression 'doSomething(\"one\" + 1, ...' must not be null") } diff --git a/idea/testData/intentions/convertSecondaryConstructorToPrimary/withComments.kt.after b/idea/testData/intentions/convertSecondaryConstructorToPrimary/withComments.kt.after index dcc3cce5813..97ad1c203df 100644 --- a/idea/testData/intentions/convertSecondaryConstructorToPrimary/withComments.kt.after +++ b/idea/testData/intentions/convertSecondaryConstructorToPrimary/withComments.kt.after @@ -5,6 +5,7 @@ class WithComments/* Some parameter */ /** * A very important property */ - val veryImportant: Any) { + val veryImportant: Any +) { } \ No newline at end of file diff --git a/idea/testData/intentions/convertSecondaryConstructorToPrimary/withComposedModifiers.kt.after b/idea/testData/intentions/convertSecondaryConstructorToPrimary/withComposedModifiers.kt.after index c8625bcf83e..29ba56a26bf 100644 --- a/idea/testData/intentions/convertSecondaryConstructorToPrimary/withComposedModifiers.kt.after +++ b/idea/testData/intentions/convertSecondaryConstructorToPrimary/withComposedModifiers.kt.after @@ -2,7 +2,9 @@ annotation class AnnParam annotation class AnnProperty -abstract class WithComposedModifiers(@AnnParam vararg @AnnProperty -open val x: String) { +abstract class WithComposedModifiers( + @AnnParam vararg @AnnProperty + open val x: String +) { } \ No newline at end of file diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/argument.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/argument.kt.after index 90bae7d800b..b7fef47be8d 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/argument.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/argument.kt.after @@ -1,7 +1,9 @@ fun foo(f: (Int) -> String) {} fun test() { - foo(fun(it: Int): String { - return "" - }) + foo( + fun(it: Int): String { + return "" + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/explicitParameterName.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/explicitParameterName.kt.after index 81ddd1e9ddc..9cb92ff3363 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/explicitParameterName.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/explicitParameterName.kt.after @@ -1,7 +1,9 @@ fun bar(f: (Int, Int) -> String) {} fun test() { - bar(fun(i: Int, j: Int): String { - return "$i$j" - }) + bar( + fun(i: Int, j: Int): String { + return "$i$j" + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/extention1.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/extention1.kt.after index a1c5dfc3eb9..d315899c9e7 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/extention1.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/extention1.kt.after @@ -2,7 +2,9 @@ class Foo fun bar(f: Foo.() -> Unit) {} fun main(args: Array) { - bar(fun Foo.() { + bar( + fun Foo.() { - }) + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/extention2.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/extention2.kt.after index b0a50a43a78..33abe29da48 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/extention2.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/extention2.kt.after @@ -2,7 +2,9 @@ class Foo fun baz(f: Foo.(i: Int, j: Int) -> Int) {} fun main(args: Array) { - baz(fun Foo.(i: Int, j: Int): Int { - return i + j - }) + baz( + fun Foo.(i: Int, j: Int): Int { + return i + j + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/fullyQualified.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/fullyQualified.kt.after index e5217d2f383..941191365e9 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/fullyQualified.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/fullyQualified.kt.after @@ -6,7 +6,9 @@ import java.util.* fun foo(f: () -> ArrayDeque<*>) {} fun test() { - foo(fun(): ArrayDeque { - return ArrayDeque() - }) + foo( + fun(): ArrayDeque { + return ArrayDeque() + } + ) } diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/fullyQualified_ni.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/fullyQualified_ni.kt.after index 9f04281b337..15fae5c174a 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/fullyQualified_ni.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/fullyQualified_ni.kt.after @@ -6,7 +6,9 @@ import java.util.* fun foo(f: () -> ArrayDeque<*>) {} fun test() { - foo(fun(): ArrayDeque<*> { - return ArrayDeque() - }) + foo( + fun(): ArrayDeque<*> { + return ArrayDeque() + } + ) } diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/hasComment.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/hasComment.kt.after index cc7bf9cd4aa..ec0fa2a1dd2 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/hasComment.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/hasComment.kt.after @@ -1,9 +1,11 @@ fun foo(f: (Int) -> String) {} fun test() { - foo(fun(it: Int): String { - // comment1 - return "" - // comment2 - }) + foo( + fun(it: Int): String { + // comment1 + return "" + // comment2 + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/hasReturn1.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/hasReturn1.kt.after index 086a345fb27..04226461f7c 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/hasReturn1.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/hasReturn1.kt.after @@ -1,7 +1,9 @@ fun foo(f: (Int) -> String) {} fun test() { - foo(fun(it: Int): String { - return "$it" - }) + foo( + fun(it: Int): String { + return "$it" + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/hasReturn2.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/hasReturn2.kt.after index 09659ab731d..73f3a2ce700 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/hasReturn2.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/hasReturn2.kt.after @@ -1,10 +1,12 @@ fun foo(f: (Int) -> String) {} fun test() { - foo(fun(it: Int): String { - if (it == 1) { - return "1" - } - return "$it" - }) + foo( + fun(it: Int): String { + if (it == 1) { + return "1" + } + return "$it" + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/hasReturn3.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/hasReturn3.kt.after index edda1dfacdc..3b5ca2b3d73 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/hasReturn3.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/hasReturn3.kt.after @@ -1,13 +1,15 @@ fun foo(f: (Int) -> String) {} fun test() { - foo(fun(it: Int): String { - if (it == 1) { - return "1" - } else if (it == 2) { - return "2" - } else { - return "$it" - } - }) + foo( + fun(it: Int): String { + if (it == 1) { + return "1" + } else if (it == 2) { + return "2" + } else { + return "$it" + } + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/hasReturn4.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/hasReturn4.kt.after index c58e967242f..3a79f70236f 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/hasReturn4.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/hasReturn4.kt.after @@ -2,10 +2,12 @@ fun foo(f: (Int) -> String) {} fun test() { - foo(fun(it: Int): String { - listOf(1).map { - return@map 2 - } - return "$it" - }) + foo( + fun(it: Int): String { + listOf(1).map { + return@map 2 + } + return "$it" + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/hasSomeStatements.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/hasSomeStatements.kt.after index 831d4f1ffed..742ebf3e105 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/hasSomeStatements.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/hasSomeStatements.kt.after @@ -1,8 +1,10 @@ fun foo(f: (Int) -> String) {} fun test() { - foo(fun(it: Int): String { - val b = it == 1 - return if (b) "1" else "2" - }) + foo( + fun(it: Int): String { + val b = it == 1 + return if (b) "1" else "2" + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/implicitParameterName.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/implicitParameterName.kt.after index 086a345fb27..04226461f7c 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/implicitParameterName.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/implicitParameterName.kt.after @@ -1,7 +1,9 @@ fun foo(f: (Int) -> String) {} fun test() { - foo(fun(it: Int): String { - return "$it" - }) + foo( + fun(it: Int): String { + return "$it" + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/javaMethod.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/javaMethod.kt.after index 700ba6055bc..167a115c7ec 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/javaMethod.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/javaMethod.kt.after @@ -1,5 +1,7 @@ fun main() { - Test().foo(fun(it: Int) { + Test().foo( + fun(it: Int) { - }) + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/namedArgument.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/namedArgument.kt.after index ff91e9e8cb6..1d8f79cebab 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/namedArgument.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/namedArgument.kt.after @@ -3,5 +3,6 @@ fun baz(name: String, f: (Int) -> String) {} fun test() { baz(name = "", f = fun(it: Int): String { return "$it" - }) + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/noParameter.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/noParameter.kt.after index 179a9737ed0..8b1e712eedd 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/noParameter.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/noParameter.kt.after @@ -1,7 +1,9 @@ fun foo(f: () -> String) {} fun test() { - foo(fun(): String { - return "" - }) + foo( + fun(): String { + return "" + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/returnUnit.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/returnUnit.kt.after index b350eff4b22..1afdd28f8a0 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/returnUnit.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/returnUnit.kt.after @@ -3,8 +3,10 @@ fun unit(f: (Int) -> Unit) {} fun foo(i: Int) {} fun test() { - unit(fun(it: Int) { - foo(it) - foo(it) - }) + unit( + fun(it: Int) { + foo(it) + foo(it) + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/lambdaToAnonymousFunction/withPackage.kt.after b/idea/testData/intentions/lambdaToAnonymousFunction/withPackage.kt.after index 79460815a32..b962f8400b2 100644 --- a/idea/testData/intentions/lambdaToAnonymousFunction/withPackage.kt.after +++ b/idea/testData/intentions/lambdaToAnonymousFunction/withPackage.kt.after @@ -7,7 +7,9 @@ data class My(val x: Int) fun foo(f: () -> My) {} fun test() { - foo(fun(): My { - return My(42) - }) + foo( + fun(): My { + return My(42) + } + ) } diff --git a/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda1.kt.after b/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda1.kt.after index 22113a0b5b6..d5b0cdc8acf 100644 --- a/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda1.kt.after +++ b/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda1.kt.after @@ -1,8 +1,10 @@ // IS_APPLICABLE: true fun foo() { - bar(2, { - it * 3 - }) + bar(2, + { + it * 3 + } + ) } fun bar(a: Int, b: (Int) -> Int) { diff --git a/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda13.kt.after b/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda13.kt.after index 9896b5b18ec..faeef86c6d5 100644 --- a/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda13.kt.after +++ b/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda13.kt.after @@ -1,8 +1,10 @@ // IS_APPLICABLE: true fun foo() { - bar(b = { - it * 3 - }) + bar( + b = { + it * 3 + } + ) } fun bar(a : Int = 2, b: (Int) -> Int) { diff --git a/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda14.kt.after b/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda14.kt.after index 5e5a9a81866..dd4eda1e2c3 100644 --- a/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda14.kt.after +++ b/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda14.kt.after @@ -1,8 +1,10 @@ // IS_APPLICABLE: true fun foo() { - bar(1, b = { - it * 3 - }) + bar(1, + b = { + it * 3 + } + ) } fun bar(c: Int, a: Int = 2, b: (Int) -> Int) { diff --git a/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda3.kt.after b/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda3.kt.after index ea70185af52..04dd0a95087 100644 --- a/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda3.kt.after +++ b/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda3.kt.after @@ -1,9 +1,11 @@ // IS_APPLICABLE: true fun foo() { - bar(2, { - val x = 3 - it * x - }) + bar(2, + { + val x = 3 + it * x + } + ) } fun bar(a: Int, b: (Int) -> Int) { diff --git a/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda4.kt.after b/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda4.kt.after index 24d9a00974a..8d2f66f46f1 100644 --- a/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda4.kt.after +++ b/idea/testData/intentions/moveLambdaInsideParentheses/moveLambda4.kt.after @@ -1,9 +1,11 @@ // IS_APPLICABLE: true fun foo() { - bar(a = 2, b = { - val x = 3 - it * x - }) + bar(a = 2, + b = { + val x = 3 + it * x + } + ) } fun bar(a: Int, b: (Int) -> Int) { diff --git a/idea/testData/intentions/objectLiteralToLambda/QualifiedReturn.kt.after b/idea/testData/intentions/objectLiteralToLambda/QualifiedReturn.kt.after index 6e1da0c3d8a..58ccc566480 100644 --- a/idea/testData/intentions/objectLiteralToLambda/QualifiedReturn.kt.after +++ b/idea/testData/intentions/objectLiteralToLambda/QualifiedReturn.kt.after @@ -3,11 +3,13 @@ fun foo(runnable: Runnable) {} fun bar(list: List) { - foo(Runnable { - list.filter(fun (element: String): Boolean { - if (element == "a") return false - if (element == "b") return@Runnable - return true - }) - }) + foo( + Runnable { + list.filter(fun (element: String): Boolean { + if (element == "a") return false + if (element == "b") return@Runnable + return true + }) + } + ) } diff --git a/idea/testData/intentions/objectLiteralToLambda/ReturnNoValue.kt.after b/idea/testData/intentions/objectLiteralToLambda/ReturnNoValue.kt.after index 8fca6b5e8fa..d155c03c870 100644 --- a/idea/testData/intentions/objectLiteralToLambda/ReturnNoValue.kt.after +++ b/idea/testData/intentions/objectLiteralToLambda/ReturnNoValue.kt.after @@ -3,9 +3,11 @@ fun foo(runnable: Runnable) {} fun bar(p: Int) { - foo(Runnable { - if (p < 0) return@Runnable - println("a") - println("b") - }) + foo( + Runnable { + if (p < 0) return@Runnable + println("a") + println("b") + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/objectLiteralToLambda/ReturnNotLast.kt.after b/idea/testData/intentions/objectLiteralToLambda/ReturnNotLast.kt.after index cdf08d56a55..7e569d712e7 100644 --- a/idea/testData/intentions/objectLiteralToLambda/ReturnNotLast.kt.after +++ b/idea/testData/intentions/objectLiteralToLambda/ReturnNotLast.kt.after @@ -5,8 +5,10 @@ import java.io.FilenameFilter fun foo(filter: FilenameFilter) {} fun bar() { - foo(FilenameFilter { file, name -> - if (file.isDirectory) return@FilenameFilter true - name == "x" - }) + foo( + FilenameFilter { file, name -> + if (file.isDirectory) return@FilenameFilter true + name == "x" + } + ) } diff --git a/idea/testData/intentions/objectLiteralToLambda/ReturnsInIf.kt.after b/idea/testData/intentions/objectLiteralToLambda/ReturnsInIf.kt.after index d7670e97b87..880169ad0a4 100644 --- a/idea/testData/intentions/objectLiteralToLambda/ReturnsInIf.kt.after +++ b/idea/testData/intentions/objectLiteralToLambda/ReturnsInIf.kt.after @@ -5,18 +5,20 @@ import java.io.FileFilter fun foo(filter: FileFilter) {} fun bar() { - foo(FileFilter { file -> - val name = file.name - if (name.startsWith("a")) { - false - } - else { - if (name.endsWith("b")) - true - else { - val l = name.length - l > 10 + foo( + FileFilter { file -> + val name = file.name + if (name.startsWith("a")) { + false + } + else { + if (name.endsWith("b")) + true + else { + val l = name.length + l > 10 + } + } } - } - }) + ) } diff --git a/idea/testData/intentions/objectLiteralToLambda/ReturnsInWhen.kt.after b/idea/testData/intentions/objectLiteralToLambda/ReturnsInWhen.kt.after index 6557197a43e..c8905be43b5 100644 --- a/idea/testData/intentions/objectLiteralToLambda/ReturnsInWhen.kt.after +++ b/idea/testData/intentions/objectLiteralToLambda/ReturnsInWhen.kt.after @@ -5,17 +5,19 @@ import java.io.FileFilter fun foo(filter: FileFilter) {} fun bar() { - foo(FileFilter { file -> - val name = file.name - when (name) { - "foo" -> true + foo( + FileFilter { file -> + val name = file.name + when (name) { + "foo" -> true - "bar" -> false + "bar" -> false - else -> { - if (name.startsWith("a")) return@FileFilter true - false + else -> { + if (name.startsWith("a")) return@FileFilter true + false + } + } } - } - }) + ) } diff --git a/idea/testData/intentions/objectLiteralToLambda/SamAdapterNeededBecauseOfLabeledReturn.kt.after b/idea/testData/intentions/objectLiteralToLambda/SamAdapterNeededBecauseOfLabeledReturn.kt.after index 688d0a8cd5c..726879dc83b 100644 --- a/idea/testData/intentions/objectLiteralToLambda/SamAdapterNeededBecauseOfLabeledReturn.kt.after +++ b/idea/testData/intentions/objectLiteralToLambda/SamAdapterNeededBecauseOfLabeledReturn.kt.after @@ -3,8 +3,10 @@ import javax.swing.SwingUtilities fun bar(p: Int) { - SwingUtilities.invokeLater(Runnable { - if (p < 0) return@Runnable - throw UnsupportedOperationException() - }) + SwingUtilities.invokeLater( + Runnable { + if (p < 0) return@Runnable + throw UnsupportedOperationException() + } + ) } \ No newline at end of file diff --git a/idea/testData/intentions/objectLiteralToLambda/StatementAndReturn.kt.after b/idea/testData/intentions/objectLiteralToLambda/StatementAndReturn.kt.after index 612cdb4b03d..e79d119e493 100644 --- a/idea/testData/intentions/objectLiteralToLambda/StatementAndReturn.kt.after +++ b/idea/testData/intentions/objectLiteralToLambda/StatementAndReturn.kt.after @@ -5,8 +5,10 @@ import java.io.FileFilter fun foo(filter: FileFilter) {} fun bar() { - foo(FileFilter { file -> - val name = file.name - name.startsWith("a") - }) + foo( + FileFilter { file -> + val name = file.name + name.startsWith("a") + } + ) } diff --git a/idea/testData/intentions/operatorToFunction/keepComments.kt.after b/idea/testData/intentions/operatorToFunction/keepComments.kt.after index b23549c9a76..46bb53b075d 100644 --- a/idea/testData/intentions/operatorToFunction/keepComments.kt.after +++ b/idea/testData/intentions/operatorToFunction/keepComments.kt.after @@ -4,7 +4,9 @@ interface C { class D(val c: C) { fun foo() { - this.c/* and this is c */.set("a", // it's "a" - "b" /* and this is "b" */, /* we use 10 */10) + this.c/* and this is c */.set( + "a", // it's "a" + "b" /* and this is "b" */, /* we use 10 */10 + ) } } diff --git a/idea/testData/intentions/samConversionToAnonymousObject/nestedClass.kt.after b/idea/testData/intentions/samConversionToAnonymousObject/nestedClass.kt.after index 51f7a399228..06721000673 100644 --- a/idea/testData/intentions/samConversionToAnonymousObject/nestedClass.kt.after +++ b/idea/testData/intentions/samConversionToAnonymousObject/nestedClass.kt.after @@ -1,7 +1,9 @@ fun main() { - J().foo(object : J.Sam { - override fun bar() { + J().foo( + object : J.Sam { + override fun bar() { - } - }) + } + } + ) } diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/keepComments/addArguments.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/keepComments/addArguments.kt.after index 0cd34007e18..20c4646f4cb 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/keepComments/addArguments.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/keepComments/addArguments.kt.after @@ -7,7 +7,9 @@ fun newFun(p1: Int, a: Int, p2: Int, p3: Int, b: Int){} fun foo() { - newFun(0, // 0 + newFun( + 0, // 0 -1, 1, // 1 2, // 2 - -2) + -2 + ) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/keepComments/commentBeforeArgument.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/keepComments/commentBeforeArgument.kt.after index 1ab6cf8d55e..c8fa6dc09ed 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/keepComments/commentBeforeArgument.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/keepComments/commentBeforeArgument.kt.after @@ -7,7 +7,12 @@ fun newFun(p4: Int, p3: Int, p2: Int, p1: Int, p0: Int){} fun foo() { - newFun(/* 4 */ 4, 3, 2, // 2 - /* 1 */ 1, - /* 0 */ 0) + newFun( +/* 4 */ + 4, 3, 2, // 2 + /* 1 */ + 1, + /* 0 */ + 0 + ) } diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/keepComments/multipleArguments.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/keepComments/multipleArguments.kt.after index b1565b42df9..5912a5f7f51 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/keepComments/multipleArguments.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/keepComments/multipleArguments.kt.after @@ -8,7 +8,8 @@ interface X { fun newFun(x: X, a: Int, b: Int){} fun foo(x: X) { - newFun(x/*receiver*/, 1, // pass 1 + newFun( + x/*receiver*/, 1, // pass 1 2 // pass 2 ) } diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/addArgument.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/addArgument.kt.after index fc116e658a2..6e2a8b03e2c 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/addArgument.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/addArgument.kt.after @@ -11,5 +11,6 @@ fun foo(x: X) { x.newFun( 1, 2, - 0) + 0 + ) } diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/simple.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/simple.kt.after index 56f9d27ce03..9d0258c3363 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/simple.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/simple.kt.after @@ -8,7 +8,9 @@ interface X { } fun foo(x: X) { - x.newFun(1, + x.newFun( + 1, 2, - 3) + 3 + ) } diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameterAndLambda.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameterAndLambda.kt.after index f926222f2b9..bee6b946816 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameterAndLambda.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameterAndLambda.kt.after @@ -18,7 +18,9 @@ fun useSimple(s: Int): Int { fun println(s: String) {} fun useIt() { - val t = useSimple(simple { - println("abc") - }) + val t = useSimple( + simple { + println("abc") + } + ) } \ No newline at end of file diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameterAndLambdaComplex.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameterAndLambdaComplex.kt.after index 8bdc3d7ab68..702b3e0c5e2 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameterAndLambdaComplex.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameterAndLambdaComplex.kt.after @@ -36,5 +36,6 @@ fun createHi(any: Any) = "Hi $any" val unDeprecateMe = mutableListOf("Hello").apply { addA(d(::createHi, 1 ) { // Run the quick fix from the IDE and watch it produce broken code. println("Yo") - }, Unit) + }, Unit + ) } \ No newline at end of file diff --git a/idea/testData/refactoring/changeSignature/AddParameterKeepFormatAfter.kt b/idea/testData/refactoring/changeSignature/AddParameterKeepFormatAfter.kt index ca392c3cf99..1bb5d3bc547 100644 --- a/idea/testData/refactoring/changeSignature/AddParameterKeepFormatAfter.kt +++ b/idea/testData/refactoring/changeSignature/AddParameterKeepFormatAfter.kt @@ -3,15 +3,19 @@ fun foo(a: Int, b: Int, d: Int, c: Int, e: Int) { } fun test() { - foo(1, + foo( + 1, 2, 4, 3, - 5) - foo(1, 2, + 5 + ) + foo( + 1, 2, 4, 3, - 5) + 5 + ) foo( 1, 2, diff --git a/idea/testData/refactoring/changeSignature/MoveLambdaParameterAfter.kt b/idea/testData/refactoring/changeSignature/MoveLambdaParameterAfter.kt index e344318959f..5acad349498 100644 --- a/idea/testData/refactoring/changeSignature/MoveLambdaParameterAfter.kt +++ b/idea/testData/refactoring/changeSignature/MoveLambdaParameterAfter.kt @@ -3,7 +3,11 @@ fun foo(x: Int, cl: () -> Int, y: Int): Int { } fun bar() { - foo(1, { - 3 - }, 2) + foo( + 1, + { + 3 + }, + 2 + ) } \ No newline at end of file diff --git a/idea/testData/refactoring/changeSignature/NoDefaultValuesInOverridesAfter.kt b/idea/testData/refactoring/changeSignature/NoDefaultValuesInOverridesAfter.kt index 5f6a6c2bda6..ab9799fd025 100644 --- a/idea/testData/refactoring/changeSignature/NoDefaultValuesInOverridesAfter.kt +++ b/idea/testData/refactoring/changeSignature/NoDefaultValuesInOverridesAfter.kt @@ -1,18 +1,24 @@ interface T { - fun foo(a: Int = 1, - b: String = "2") + fun foo( + a: Int = 1, + b: String = "2" + ) } open class A: T { - override fun foo(a: Int, - b: String) { + override fun foo( + a: Int, + b: String + ) { throw UnsupportedOperationException() } } class B: A() { - override fun foo(a: Int, - b: String) { + override fun foo( + a: Int, + b: String + ) { throw UnsupportedOperationException() } } \ No newline at end of file diff --git a/idea/testData/refactoring/changeSignature/RemoveParameterKeepFormat1After.kt b/idea/testData/refactoring/changeSignature/RemoveParameterKeepFormat1After.kt index 7fb9579c69b..c77792e95d7 100644 --- a/idea/testData/refactoring/changeSignature/RemoveParameterKeepFormat1After.kt +++ b/idea/testData/refactoring/changeSignature/RemoveParameterKeepFormat1After.kt @@ -3,8 +3,10 @@ fun foo(b: Int, c: Int) { } fun test() { - foo(2, - 3) + foo( + 2, + 3 + ) foo(2, 3) foo( 2, diff --git a/idea/testData/refactoring/changeSignature/RemoveParameterKeepFormat2After.kt b/idea/testData/refactoring/changeSignature/RemoveParameterKeepFormat2After.kt index 1079d7d2fbe..2a3fe2134ca 100644 --- a/idea/testData/refactoring/changeSignature/RemoveParameterKeepFormat2After.kt +++ b/idea/testData/refactoring/changeSignature/RemoveParameterKeepFormat2After.kt @@ -3,8 +3,10 @@ fun foo(a: Int, c: Int) { } fun test() { - foo(1, - 3) + foo( + 1, + 3 + ) foo(1, 3) foo( 1, diff --git a/idea/testData/refactoring/changeSignature/RemoveParameterKeepFormat3After.kt b/idea/testData/refactoring/changeSignature/RemoveParameterKeepFormat3After.kt index 138eb4d8a75..7ea2962b5a5 100644 --- a/idea/testData/refactoring/changeSignature/RemoveParameterKeepFormat3After.kt +++ b/idea/testData/refactoring/changeSignature/RemoveParameterKeepFormat3After.kt @@ -3,8 +3,10 @@ fun foo(a: Int, b: Int) { } fun test() { - foo(1, - 2) + foo( + 1, + 2 + ) foo(1, 2) foo( 1, diff --git a/idea/testData/refactoring/changeSignature/SwapParametersKeepFormatAfter.kt b/idea/testData/refactoring/changeSignature/SwapParametersKeepFormatAfter.kt index 80046ba50d4..b826569b5e1 100644 --- a/idea/testData/refactoring/changeSignature/SwapParametersKeepFormatAfter.kt +++ b/idea/testData/refactoring/changeSignature/SwapParametersKeepFormatAfter.kt @@ -3,11 +3,15 @@ fun foo(c: Int, b: Int, a: Int) { } fun test() { - foo(3, + foo( + 3, 2, - 1) - foo(3, 2, - 1) + 1 + ) + foo( + 3, 2, + 1 + ) foo( 3, 2, diff --git a/idea/testData/refactoring/inline/function/returnAtEnd/DefaultParameter.kt.after b/idea/testData/refactoring/inline/function/returnAtEnd/DefaultParameter.kt.after index 096a8a85e59..00fda29c9ff 100644 --- a/idea/testData/refactoring/inline/function/returnAtEnd/DefaultParameter.kt.after +++ b/idea/testData/refactoring/inline/function/returnAtEnd/DefaultParameter.kt.after @@ -3,5 +3,6 @@ fun callInDefault(simple: List = provideSimple(), complex: List val result = mutableListOf("statement 1") result.add("statement 2") result -}) { +} +) { } \ No newline at end of file diff --git a/idea/testData/refactoring/inline/function/returnAtEnd/ReturnFromLambda.kt.after b/idea/testData/refactoring/inline/function/returnAtEnd/ReturnFromLambda.kt.after index 7edca71c0e8..6bf0b8643f7 100644 --- a/idea/testData/refactoring/inline/function/returnAtEnd/ReturnFromLambda.kt.after +++ b/idea/testData/refactoring/inline/function/returnAtEnd/ReturnFromLambda.kt.after @@ -1,6 +1,8 @@ fun g() { - println(listOf("a", "b").any { - if (it.isEmpty()) return@any false - it.length < 10 - }) -} + println( + listOf("a", "b").any { + if (it.isEmpty()) return@any false + it.length < 10 + } + ) +} \ No newline at end of file diff --git a/idea/testData/refactoring/introduceLambdaParameter/multiline/multilineBinaryExpression.kt.after b/idea/testData/refactoring/introduceLambdaParameter/multiline/multilineBinaryExpression.kt.after index 342fc53f9cf..10b7496c2fe 100644 --- a/idea/testData/refactoring/introduceLambdaParameter/multiline/multilineBinaryExpression.kt.after +++ b/idea/testData/refactoring/introduceLambdaParameter/multiline/multilineBinaryExpression.kt.after @@ -1,8 +1,10 @@ fun foo(i: Int) { } -fun test(i: () -> Int = { - (1 - + 2) -}) { +fun test( + i: () -> Int = { + (1 + + 2) + } +) { foo(i()) } \ No newline at end of file diff --git a/idea/testData/refactoring/introduceLambdaParameter/multiline/multilineBinaryExpressionWithComments.kt.after b/idea/testData/refactoring/introduceLambdaParameter/multiline/multilineBinaryExpressionWithComments.kt.after index 89f2f50f6d8..17464f64e2c 100644 --- a/idea/testData/refactoring/introduceLambdaParameter/multiline/multilineBinaryExpressionWithComments.kt.after +++ b/idea/testData/refactoring/introduceLambdaParameter/multiline/multilineBinaryExpressionWithComments.kt.after @@ -1,8 +1,10 @@ fun foo(i: Int) { } -fun test(i: () -> Int = { - (1 // abc - /*def*/ + 2) -}) { +fun test( + i: () -> Int = { + (1 // abc + /*def*/ + 2) + } +) { foo(i()) } \ No newline at end of file diff --git a/idea/testData/refactoring/introduceLambdaParameter/multiline/multilineNestedBinaryExpression1.kt.after b/idea/testData/refactoring/introduceLambdaParameter/multiline/multilineNestedBinaryExpression1.kt.after index 2cc60b16f6a..8ff2200cba7 100644 --- a/idea/testData/refactoring/introduceLambdaParameter/multiline/multilineNestedBinaryExpression1.kt.after +++ b/idea/testData/refactoring/introduceLambdaParameter/multiline/multilineNestedBinaryExpression1.kt.after @@ -1,8 +1,10 @@ fun foo(i: Int) { } -fun test(i: () -> Int = { - (1 - + 2 - 3) -}) { +fun test( + i: () -> Int = { + (1 + + 2 - 3) + } +) { foo(i()) } \ No newline at end of file diff --git a/idea/testData/refactoring/introduceLambdaParameter/multiline/multilineNestedBinaryExpression2.kt.after b/idea/testData/refactoring/introduceLambdaParameter/multiline/multilineNestedBinaryExpression2.kt.after index 86a45908394..a16d4c690cb 100644 --- a/idea/testData/refactoring/introduceLambdaParameter/multiline/multilineNestedBinaryExpression2.kt.after +++ b/idea/testData/refactoring/introduceLambdaParameter/multiline/multilineNestedBinaryExpression2.kt.after @@ -1,8 +1,10 @@ fun foo(i: Int) { } -fun test(i: () -> Int = { - (1 + 2 - - 3) -}) { +fun test( + i: () -> Int = { + (1 + 2 + - 3) + } +) { foo(i()) } \ No newline at end of file diff --git a/idea/testData/refactoring/introduceLambdaParameter/stringTemplates/rawTemplateWithSubstring.kt.after b/idea/testData/refactoring/introduceLambdaParameter/stringTemplates/rawTemplateWithSubstring.kt.after index 94a910e4aa9..93620a73545 100644 --- a/idea/testData/refactoring/introduceLambdaParameter/stringTemplates/rawTemplateWithSubstring.kt.after +++ b/idea/testData/refactoring/introduceLambdaParameter/stringTemplates/rawTemplateWithSubstring.kt.after @@ -1,7 +1,10 @@ -fun foo(a: Int, s: (Int) -> String = { a -> - """c$a +fun foo( + a: Int, + s: (Int) -> String = { a -> + """c$a :${a + 1}d""" -}): String { + } +): String { val x = """_${s(a)}_""" val y = "_$a:${a + 1}d_" val z = """_c$a:${a + 1}d_""" diff --git a/idea/testData/refactoring/introduceParameter/multiline/multilineBinaryExpression.kt.after b/idea/testData/refactoring/introduceParameter/multiline/multilineBinaryExpression.kt.after index b782cb407cf..dd63801f420 100644 --- a/idea/testData/refactoring/introduceParameter/multiline/multilineBinaryExpression.kt.after +++ b/idea/testData/refactoring/introduceParameter/multiline/multilineBinaryExpression.kt.after @@ -1,6 +1,8 @@ fun foo(i: Int) { } -fun test(i: Int = (1 - + 2)) { +fun test( + i: Int = (1 + + 2) +) { foo(i) } \ No newline at end of file diff --git a/idea/testData/refactoring/introduceParameter/multiline/multilineBinaryExpressionWithComments.kt.after b/idea/testData/refactoring/introduceParameter/multiline/multilineBinaryExpressionWithComments.kt.after index 4fffbdfb58e..7fa3c2c9a2e 100644 --- a/idea/testData/refactoring/introduceParameter/multiline/multilineBinaryExpressionWithComments.kt.after +++ b/idea/testData/refactoring/introduceParameter/multiline/multilineBinaryExpressionWithComments.kt.after @@ -1,6 +1,8 @@ fun foo(i: Int) { } -fun test(i: Int = (1 // abc - /*def*/ + 2)) { +fun test( + i: Int = (1 // abc + /*def*/ + 2) +) { foo(i) } \ No newline at end of file diff --git a/idea/testData/refactoring/introduceParameter/multiline/multilineNestedBinaryExpression1.kt.after b/idea/testData/refactoring/introduceParameter/multiline/multilineNestedBinaryExpression1.kt.after index d47e0d33aef..f6e6786faf9 100644 --- a/idea/testData/refactoring/introduceParameter/multiline/multilineNestedBinaryExpression1.kt.after +++ b/idea/testData/refactoring/introduceParameter/multiline/multilineNestedBinaryExpression1.kt.after @@ -1,6 +1,8 @@ fun foo(i: Int) { } -fun test(i: Int = (1 - + 2 - 3)) { +fun test( + i: Int = (1 + + 2 - 3) +) { foo(i) } \ No newline at end of file diff --git a/idea/testData/refactoring/introduceParameter/multiline/multilineNestedBinaryExpression2.kt.after b/idea/testData/refactoring/introduceParameter/multiline/multilineNestedBinaryExpression2.kt.after index d662fb497ca..b2f77d6b3cd 100644 --- a/idea/testData/refactoring/introduceParameter/multiline/multilineNestedBinaryExpression2.kt.after +++ b/idea/testData/refactoring/introduceParameter/multiline/multilineNestedBinaryExpression2.kt.after @@ -1,6 +1,8 @@ fun foo(i: Int) { } -fun test(i: Int = (1 + 2 - - 3)) { +fun test( + i: Int = (1 + 2 + - 3) +) { foo(i) } \ No newline at end of file diff --git a/idea/testData/refactoring/introduceParameter/stringTemplates/rawTemplateWithSubstring.kt.after b/idea/testData/refactoring/introduceParameter/stringTemplates/rawTemplateWithSubstring.kt.after index f6fa52c447a..6b6d96b62ba 100644 --- a/idea/testData/refactoring/introduceParameter/stringTemplates/rawTemplateWithSubstring.kt.after +++ b/idea/testData/refactoring/introduceParameter/stringTemplates/rawTemplateWithSubstring.kt.after @@ -1,5 +1,8 @@ -fun foo(a: Int, s: String = """c$a - :${a + 1}d"""): String { +fun foo( + a: Int, + s: String = """c$a + :${a + 1}d""" +): String { val x = """_${s}_""" val y = "_$a:${a + 1}d_" val z = """_c$a:${a + 1}d_""" diff --git a/idea/testData/refactoring/rename/inplace/InvokeToGetWithQualifiedExpr.kt.after b/idea/testData/refactoring/rename/inplace/InvokeToGetWithQualifiedExpr.kt.after index 06125e12e12..0a4182da574 100644 --- a/idea/testData/refactoring/rename/inplace/InvokeToGetWithQualifiedExpr.kt.after +++ b/idea/testData/refactoring/rename/inplace/InvokeToGetWithQualifiedExpr.kt.after @@ -10,8 +10,10 @@ fun boo(s: Second, body: () -> Unit) { } fun foo(s: Second) { boo(s) { - s.testInvoke[{ + s.testInvoke[ + { "Hello" - }] + } + ] } } \ No newline at end of file diff --git a/idea/testData/refactoring/rename/inplace/InvokeToGetWithSafeQualifiedExpr.kt.after b/idea/testData/refactoring/rename/inplace/InvokeToGetWithSafeQualifiedExpr.kt.after index a0ff1b1ef26..7b828ef5062 100644 --- a/idea/testData/refactoring/rename/inplace/InvokeToGetWithSafeQualifiedExpr.kt.after +++ b/idea/testData/refactoring/rename/inplace/InvokeToGetWithSafeQualifiedExpr.kt.after @@ -10,8 +10,10 @@ fun boo(s: Second?, body: () -> Unit) { } fun foo(s: Second?) { boo(s) { - s?.testInvoke[{ + s?.testInvoke[ + { "Hello" - }] + } + ] } } \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/smartEnter/SmartEnterTest.kt b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/smartEnter/SmartEnterTest.kt index b1961d9364f..f6071817a81 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/smartEnter/SmartEnterTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/smartEnter/SmartEnterTest.kt @@ -994,7 +994,7 @@ class SmartEnterTest : KotlinLightCodeInsightFixtureTestCase() { } """, """ - some { (p: Int) : Int -> + some { (p: Int): Int -> } """ @@ -1007,8 +1007,7 @@ class SmartEnterTest : KotlinLightCodeInsightFixtureTestCase() { } """, """ - some { - (p: Int) : Int -> + some { (p: Int): Int -> } """ @@ -1463,7 +1462,7 @@ class SmartEnterTest : KotlinLightCodeInsightFixtureTestCase() { """ fun foo(i: Int) = 1 fun test4() { - foo(1, ) + foo(1) } """ ) diff --git a/j2k/testData/fileOrElement/annotations/annotationFromConstructorParamToProperty.kt b/j2k/testData/fileOrElement/annotations/annotationFromConstructorParamToProperty.kt index 7d881336a79..ce61b2f1aac 100644 --- a/j2k/testData/fileOrElement/annotations/annotationFromConstructorParamToProperty.kt +++ b/j2k/testData/fileOrElement/annotations/annotationFromConstructorParamToProperty.kt @@ -2,5 +2,7 @@ internal annotation class A internal annotation class B -class U(@param:A @field:B - var i: Int) \ No newline at end of file +class U( + @param:A @field:B + var i: Int +) \ No newline at end of file diff --git a/j2k/testData/fileOrElement/annotations/annotationInterface1.kt b/j2k/testData/fileOrElement/annotations/annotationInterface1.kt index e33b17a5db4..008374661fc 100644 --- a/j2k/testData/fileOrElement/annotations/annotationInterface1.kt +++ b/j2k/testData/fileOrElement/annotations/annotationInterface1.kt @@ -1,5 +1,7 @@ -internal annotation class Anon(val stringArray: Array, val intArray: IntArray, // string - val string: String) +internal annotation class Anon( + val stringArray: Array, val intArray: IntArray, // string + val string: String +) @Anon(string = "a", stringArray = ["a", "b"], intArray = [1, 2]) @Target(AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FIELD) diff --git a/j2k/testData/fileOrElement/comments/fieldsInitializedFromParams.kt b/j2k/testData/fileOrElement/comments/fieldsInitializedFromParams.kt index 5941ce3034e..27aaf7596c2 100644 --- a/j2k/testData/fileOrElement/comments/fieldsInitializedFromParams.kt +++ b/j2k/testData/fileOrElement/comments/fieldsInitializedFromParams.kt @@ -1,6 +1,5 @@ internal class C( - private val p1: Int /* parameter p1 */ // field p1 - , + private val p1: Int, /* parameter p1 */ // field p1 /** * Field myP2 */ diff --git a/j2k/testData/fileOrElement/constructors/lineBreaksBetweenParameters.kt b/j2k/testData/fileOrElement/constructors/lineBreaksBetweenParameters.kt index 0a6d3da32eb..494b08d1b9a 100644 --- a/j2k/testData/fileOrElement/constructors/lineBreaksBetweenParameters.kt +++ b/j2k/testData/fileOrElement/constructors/lineBreaksBetweenParameters.kt @@ -1,12 +1,18 @@ -internal class C1(arg1: Int, - arg2: Int, - arg3: Int) { +internal class C1( + arg1: Int, + arg2: Int, + arg3: Int +) { - constructor(x: Int, - y: Int) : this(x, x + y, 0) { + constructor( + x: Int, + y: Int + ) : this(x, x + y, 0) { } } -internal class C2(private val arg1: Int, - private val arg2: Int, - arg3: Int) +internal class C2( + private val arg1: Int, + private val arg2: Int, + arg3: Int +) diff --git a/j2k/testData/fileOrElement/detectProperties/Comments.kt b/j2k/testData/fileOrElement/detectProperties/Comments.kt index 692957db0cb..c0d45a0a766 100644 --- a/j2k/testData/fileOrElement/detectProperties/Comments.kt +++ b/j2k/testData/fileOrElement/detectProperties/Comments.kt @@ -1,4 +1,5 @@ -internal class A(// comment for field2 getter +internal class A( +// comment for field2 getter // comment for field2 setter var field2: Int // comment for field2 ) { diff --git a/j2k/testData/fileOrElement/detectProperties/DataClassWithAnnotations.kt b/j2k/testData/fileOrElement/detectProperties/DataClassWithAnnotations.kt index 32a1abee831..dd0388d7b83 100644 --- a/j2k/testData/fileOrElement/detectProperties/DataClassWithAnnotations.kt +++ b/j2k/testData/fileOrElement/detectProperties/DataClassWithAnnotations.kt @@ -1,6 +1,8 @@ internal annotation class TestAnnotation -class Test(@param:TestAnnotation @field:TestAnnotation - @get:TestAnnotation - @set:TestAnnotation - var arg: String?) +class Test( + @param:TestAnnotation @field:TestAnnotation + @get:TestAnnotation + @set:TestAnnotation + var arg: String? +) diff --git a/j2k/testData/fileOrElement/docComments/deprecatedDocTagWithMultiLineMessage.kt b/j2k/testData/fileOrElement/docComments/deprecatedDocTagWithMultiLineMessage.kt index 44c6c6832b9..f137c9bc2a2 100644 --- a/j2k/testData/fileOrElement/docComments/deprecatedDocTagWithMultiLineMessage.kt +++ b/j2k/testData/fileOrElement/docComments/deprecatedDocTagWithMultiLineMessage.kt @@ -1,7 +1,9 @@ -@Deprecated("Ph'nglui mglw'nafh\n" + - " Cthulhu R'lyeh wgah'nagl fhtagn.\n" + - " 'In His House at R'lyeh\n" + - " Dead Cthulhu waits dreaming,\n" + - " yet He shall rise and His kingdom\n" + - " shall cover the Earth.'") +@Deprecated( + "Ph'nglui mglw'nafh\n" + + " Cthulhu R'lyeh wgah'nagl fhtagn.\n" + + " 'In His House at R'lyeh\n" + + " Dead Cthulhu waits dreaming,\n" + + " yet He shall rise and His kingdom\n" + + " shall cover the Earth.'" +) class TestDeprecatedInJavadocWithMultilineMessage \ No newline at end of file diff --git a/j2k/testData/fileOrElement/enum/runnableImplementation.kt b/j2k/testData/fileOrElement/enum/runnableImplementation.kt index 099aa79fa68..5cb176d088f 100644 --- a/j2k/testData/fileOrElement/enum/runnableImplementation.kt +++ b/j2k/testData/fileOrElement/enum/runnableImplementation.kt @@ -2,7 +2,9 @@ internal enum class Color : Runnable { WHITE, BLACK, RED, YELLOW, BLUE; override fun run() { - println("name()=" + name + - ", toString()=" + toString()) + println( + "name()=" + name + + ", toString()=" + toString() + ) } } \ No newline at end of file diff --git a/j2k/testData/fileOrElement/formatting/lineBreaksBetweenArguments.kt b/j2k/testData/fileOrElement/formatting/lineBreaksBetweenArguments.kt index af66aa1a53c..5438a97bf1f 100644 --- a/j2k/testData/fileOrElement/formatting/lineBreaksBetweenArguments.kt +++ b/j2k/testData/fileOrElement/formatting/lineBreaksBetweenArguments.kt @@ -2,9 +2,10 @@ internal class F { fun f1(p1: Int, p2: Int, p3: Int, p4: Int, vararg p5: Int) {} fun f2(array: IntArray) { - f1(1, 2, + f1( + 1, 2, 3, 4, *array ) } -} +} \ No newline at end of file diff --git a/j2k/testData/fileOrElement/function/lineBreaksBetweenParameters.kt b/j2k/testData/fileOrElement/function/lineBreaksBetweenParameters.kt index 56dd17ab42d..ebb6dab7a4c 100644 --- a/j2k/testData/fileOrElement/function/lineBreaksBetweenParameters.kt +++ b/j2k/testData/fileOrElement/function/lineBreaksBetweenParameters.kt @@ -3,11 +3,14 @@ internal class C { fun foo2( p1: Int, - p2: Int) { + p2: Int + ) { } - fun foo3(p1: Int, - p2: Int) { + fun foo3( + p1: Int, + p2: Int + ) { } fun foo4( diff --git a/j2k/testData/fileOrElement/mutableCollections/FunctionParameters.kt b/j2k/testData/fileOrElement/mutableCollections/FunctionParameters.kt index 75d142c0c65..bca04c44762 100644 --- a/j2k/testData/fileOrElement/mutableCollections/FunctionParameters.kt +++ b/j2k/testData/fileOrElement/mutableCollections/FunctionParameters.kt @@ -2,11 +2,13 @@ import java.util.* internal class A { - fun foo(nonMutableCollection: Collection, + fun foo( + nonMutableCollection: Collection, mutableCollection: MutableCollection, mutableSet: MutableSet, - mutableMap: MutableMap) { + mutableMap: MutableMap + ) { mutableCollection.addAll(nonMutableCollection) mutableSet.add(mutableMap.remove("a")) } -} +} \ No newline at end of file diff --git a/j2k/testData/fileOrElement/newClassExpression/lineBreaks.kt b/j2k/testData/fileOrElement/newClassExpression/lineBreaks.kt index 3790a35a9e0..392b4a3b89c 100644 --- a/j2k/testData/fileOrElement/newClassExpression/lineBreaks.kt +++ b/j2k/testData/fileOrElement/newClassExpression/lineBreaks.kt @@ -2,8 +2,10 @@ internal class C(p1: Int, p2: Int, p3: Int) internal class User { fun foo() { - C(1, + C( + 1, 2, - 3) + 3 + ) } -} +} \ No newline at end of file diff --git a/j2k/testData/fileOrElement/objectLiteral/MyFrame.kt b/j2k/testData/fileOrElement/objectLiteral/MyFrame.kt index 7d717216c58..868c598726d 100644 --- a/j2k/testData/fileOrElement/objectLiteral/MyFrame.kt +++ b/j2k/testData/fileOrElement/objectLiteral/MyFrame.kt @@ -24,9 +24,11 @@ internal class Client : Frame() { addWindowListener(a) - addWindowListener(object : WindowAdapter() { - override fun windowClosing() {} - }) + addWindowListener( + object : WindowAdapter() { + override fun windowClosing() {} + } + ) val b = object : EmptyWindowListener { diff --git a/j2k/testData/fileOrElement/returnStatement/currentMethodBug.kt b/j2k/testData/fileOrElement/returnStatement/currentMethodBug.kt index f02c2bcde26..e343de61ce0 100644 --- a/j2k/testData/fileOrElement/returnStatement/currentMethodBug.kt +++ b/j2k/testData/fileOrElement/returnStatement/currentMethodBug.kt @@ -5,10 +5,12 @@ internal interface I { internal class C { val `object`: Any? get() { - foo(object : I { - override val int: Int - get() = 0 - }) + foo( + object : I { + override val int: Int + get() = 0 + } + ) return string } diff --git a/j2k/testData/fileOrElement/tryWithResource/WithReturnInAnonymousClass.kt b/j2k/testData/fileOrElement/tryWithResource/WithReturnInAnonymousClass.kt index e6ff0724964..a9840a6d86d 100644 --- a/j2k/testData/fileOrElement/tryWithResource/WithReturnInAnonymousClass.kt +++ b/j2k/testData/fileOrElement/tryWithResource/WithReturnInAnonymousClass.kt @@ -9,12 +9,15 @@ class C { @Throws(IOException::class) internal fun foo() { ByteArrayInputStream(ByteArray(10)).use { stream -> - bar(object : I { - @Throws(IOException::class) - override fun doIt(stream: InputStream): Int { - return stream.available() - } - }, stream) + bar( + object : I { + @Throws(IOException::class) + override fun doIt(stream: InputStream): Int { + return stream.available() + } + }, + stream + ) } } @@ -22,4 +25,4 @@ class C { internal fun bar(i: I, stream: InputStream): Int { return i.doIt(stream) } -} \ No newline at end of file +} diff --git a/j2k/testData/fileOrElement/tryWithResource/WithReturnInAnonymousClass2.kt b/j2k/testData/fileOrElement/tryWithResource/WithReturnInAnonymousClass2.kt index 35673b345b7..9caeeb3f8f9 100644 --- a/j2k/testData/fileOrElement/tryWithResource/WithReturnInAnonymousClass2.kt +++ b/j2k/testData/fileOrElement/tryWithResource/WithReturnInAnonymousClass2.kt @@ -9,12 +9,15 @@ class C { @Throws(IOException::class) internal fun foo(): Int { ByteArrayInputStream(ByteArray(10)).use { stream -> - return bar(object : I { - @Throws(IOException::class) - override fun doIt(stream: InputStream): Int { - return stream.available() - } - }, stream) + return bar( + object : I { + @Throws(IOException::class) + override fun doIt(stream: InputStream): Int { + return stream.available() + } + }, + stream + ) } } @@ -22,4 +25,4 @@ class C { internal fun bar(i: I, stream: InputStream): Int { return i.doIt(stream) } -} \ No newline at end of file +} diff --git a/nj2k/testData/copyPaste/SeveralMethodsSample.expected.kt b/nj2k/testData/copyPaste/SeveralMethodsSample.expected.kt index e64827908f4..43aa004a70d 100644 --- a/nj2k/testData/copyPaste/SeveralMethodsSample.expected.kt +++ b/nj2k/testData/copyPaste/SeveralMethodsSample.expected.kt @@ -13,7 +13,7 @@ class A { return JetBundle.message( "x.in.y", DescriptorRenderer.COMPACT.render(declarationDescriptor), - IdeDescriptorRenderers.SOURCE_CODE_SHORT_NAMES_NO_ANNOTATIONS.render(containingDescriptor) + IdeDescriptorRenderers.SOURCE_CODE_SHORT_NAMES_NO_ANNOTATIONS.render(containingDescriptor), ) } } diff --git a/nj2k/testData/newJ2k/annotations/annotationInterface1.kt b/nj2k/testData/newJ2k/annotations/annotationInterface1.kt index 223b81ef08c..1db04ce77f7 100644 --- a/nj2k/testData/newJ2k/annotations/annotationInterface1.kt +++ b/nj2k/testData/newJ2k/annotations/annotationInterface1.kt @@ -1,5 +1,7 @@ -internal annotation class Anon(val stringArray: Array, val intArray: IntArray, // string - val string: String) +internal annotation class Anon( + val stringArray: Array, val intArray: IntArray, // string + val string: String +) @Anon(string = "a", stringArray = ["a", "b"], intArray = [1, 2]) @Target(AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FIELD) diff --git a/nj2k/testData/newJ2k/annotations/kt-31726.kt b/nj2k/testData/newJ2k/annotations/kt-31726.kt index 4a2164ddacb..36e36b54afd 100644 --- a/nj2k/testData/newJ2k/annotations/kt-31726.kt +++ b/nj2k/testData/newJ2k/annotations/kt-31726.kt @@ -1,7 +1,8 @@ import javaApi.SpecialExternal //Annotation class: -annotation class Special(val names: Array //array is used +annotation class Special( + val names: Array //array is used ) //Class with annotation: @Special(names = ["name1"]) diff --git a/nj2k/testData/newJ2k/comments/fieldsInitializedFromParams.kt b/nj2k/testData/newJ2k/comments/fieldsInitializedFromParams.kt index 523bf702017..0fc94625752 100644 --- a/nj2k/testData/newJ2k/comments/fieldsInitializedFromParams.kt +++ b/nj2k/testData/newJ2k/comments/fieldsInitializedFromParams.kt @@ -1,7 +1,9 @@ -internal class C(// field p1 - private val p1: Int /* parameter p1 */, +internal class C( +// field p1 + private val p1: Int, /* parameter p1 */ /** * Field myP2 */ private val myP2: Int, /* Field p3 */ - var p3: Int) \ No newline at end of file + var p3: Int +) \ No newline at end of file diff --git a/nj2k/testData/newJ2k/constructors/lineBreaksBetweenParameters.kt b/nj2k/testData/newJ2k/constructors/lineBreaksBetweenParameters.kt index e1fdefe5d0e..223e264779a 100644 --- a/nj2k/testData/newJ2k/constructors/lineBreaksBetweenParameters.kt +++ b/nj2k/testData/newJ2k/constructors/lineBreaksBetweenParameters.kt @@ -1,11 +1,17 @@ -internal class C1(arg1: Int, - arg2: Int, - arg3: Int) { - constructor(x: Int, - y: Int) : this(x, x + y, 0) { +internal class C1( + arg1: Int, + arg2: Int, + arg3: Int +) { + constructor( + x: Int, + y: Int + ) : this(x, x + y, 0) { } } -internal class C2(private val arg1: Int, - private val arg2: Int, - arg3: Int) \ No newline at end of file +internal class C2( + private val arg1: Int, + private val arg2: Int, + arg3: Int +) \ No newline at end of file diff --git a/nj2k/testData/newJ2k/detectProperties/Comments.kt b/nj2k/testData/newJ2k/detectProperties/Comments.kt index 391e2f649fa..378efaf5905 100644 --- a/nj2k/testData/newJ2k/detectProperties/Comments.kt +++ b/nj2k/testData/newJ2k/detectProperties/Comments.kt @@ -1,7 +1,9 @@ -internal class A(// comment for field2 setter +internal class A( +// comment for field2 setter // comment for field2 getter var field2 // comment for field2 - : Int) { + : Int +) { /** * Comment for field1 setter */ diff --git a/nj2k/testData/newJ2k/detectProperties/DataClassWithAnnotations.kt b/nj2k/testData/newJ2k/detectProperties/DataClassWithAnnotations.kt index 5b813d10987..f00eb3fe7f7 100644 --- a/nj2k/testData/newJ2k/detectProperties/DataClassWithAnnotations.kt +++ b/nj2k/testData/newJ2k/detectProperties/DataClassWithAnnotations.kt @@ -2,6 +2,8 @@ internal annotation class TestAnnotationField internal annotation class TestAnnotationParam internal annotation class TestAnnotationGet internal annotation class TestAnnotationSet -class Test(@field:TestAnnotationField @set:TestAnnotationSet - @get:TestAnnotationGet - @param:TestAnnotationParam var arg: String) \ No newline at end of file +class Test( + @field:TestAnnotationField @set:TestAnnotationSet + @get:TestAnnotationGet + @param:TestAnnotationParam var arg: String +) \ No newline at end of file diff --git a/nj2k/testData/newJ2k/docComments/deprecatedDocTagWithMultiLineMessage.kt b/nj2k/testData/newJ2k/docComments/deprecatedDocTagWithMultiLineMessage.kt index f0c221b93bf..3c94f856c2a 100644 --- a/nj2k/testData/newJ2k/docComments/deprecatedDocTagWithMultiLineMessage.kt +++ b/nj2k/testData/newJ2k/docComments/deprecatedDocTagWithMultiLineMessage.kt @@ -1,7 +1,9 @@ -@Deprecated("""Ph'nglui mglw'nafh +@Deprecated( + """Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn. 'In His House at R'lyeh Dead Cthulhu waits dreaming, yet He shall rise and His kingdom - shall cover the Earth.'""") + shall cover the Earth.'""" +) class TestDeprecatedInJavadocWithMultilineMessage \ No newline at end of file diff --git a/nj2k/testData/newJ2k/enum/runnableImplementation.kt b/nj2k/testData/newJ2k/enum/runnableImplementation.kt index 099aa79fa68..5cb176d088f 100644 --- a/nj2k/testData/newJ2k/enum/runnableImplementation.kt +++ b/nj2k/testData/newJ2k/enum/runnableImplementation.kt @@ -2,7 +2,9 @@ internal enum class Color : Runnable { WHITE, BLACK, RED, YELLOW, BLUE; override fun run() { - println("name()=" + name + - ", toString()=" + toString()) + println( + "name()=" + name + + ", toString()=" + toString() + ) } } \ No newline at end of file diff --git a/nj2k/testData/newJ2k/formatting/lineBreaksBetweenArguments.kt b/nj2k/testData/newJ2k/formatting/lineBreaksBetweenArguments.kt index c98620e93de..d6dab4f7270 100644 --- a/nj2k/testData/newJ2k/formatting/lineBreaksBetweenArguments.kt +++ b/nj2k/testData/newJ2k/formatting/lineBreaksBetweenArguments.kt @@ -1,7 +1,8 @@ internal class F { fun f1(p1: Int, p2: Int, p3: Int, p4: Int, vararg p5: Int) {} fun f2(array: IntArray) { - f1(1, 2, + f1( + 1, 2, 3, 4, *array ) diff --git a/nj2k/testData/newJ2k/function/lineBreaksBetweenParameters.kt b/nj2k/testData/newJ2k/function/lineBreaksBetweenParameters.kt index f01965d887b..5fda2669700 100644 --- a/nj2k/testData/newJ2k/function/lineBreaksBetweenParameters.kt +++ b/nj2k/testData/newJ2k/function/lineBreaksBetweenParameters.kt @@ -2,11 +2,14 @@ internal class C { fun foo1(p1: Int, p2: Int) {} fun foo2( p1: Int, - p2: Int) { + p2: Int + ) { } - fun foo3(p1: Int, - p2: Int) { + fun foo3( + p1: Int, + p2: Int + ) { } fun foo4( diff --git a/nj2k/testData/newJ2k/issues/kt-19569.kt b/nj2k/testData/newJ2k/issues/kt-19569.kt index 30f5985f0dc..191ab3b360d 100644 --- a/nj2k/testData/newJ2k/issues/kt-19569.kt +++ b/nj2k/testData/newJ2k/issues/kt-19569.kt @@ -1,6 +1,8 @@ class TestJavaBoxedPrimitives { - fun foo(x1: Boolean, x2: Byte, x3: Short, x4: Int, - x5: Long, x6: Float, x7: Double, x8: Char): Array { + fun foo( + x1: Boolean, x2: Byte, x3: Short, x4: Int, + x5: Long, x6: Float, x7: Double, x8: Char + ): Array { return arrayOf(x1, x2, x3, x4, x5, x6, x7, x8) } -} +} \ No newline at end of file diff --git a/nj2k/testData/newJ2k/methodCallExpression/stringMethods.kt b/nj2k/testData/newJ2k/methodCallExpression/stringMethods.kt index b2a0288b3c5..e1d986f404d 100644 --- a/nj2k/testData/newJ2k/methodCallExpression/stringMethods.kt +++ b/nj2k/testData/newJ2k/methodCallExpression/stringMethods.kt @@ -66,15 +66,17 @@ internal class A { val s = "test string" s == "test" s.equals( - "tesT" - , ignoreCase = true) + "tesT", + ignoreCase = true + ) s.compareTo("Test", ignoreCase = true) s.regionMatches( 0, "TE", 0, - 2 - , ignoreCase = true) + 2, + ignoreCase = true + ) s.regionMatches(0, "st", 1, 2) s.replace("\\w+".toRegex(), "---") .replaceFirst("([s-t])".toRegex(), "A$1") diff --git a/nj2k/testData/newJ2k/mutableCollections/FunctionParameters.kt b/nj2k/testData/newJ2k/mutableCollections/FunctionParameters.kt index 2dcc227b239..dde9c24226f 100644 --- a/nj2k/testData/newJ2k/mutableCollections/FunctionParameters.kt +++ b/nj2k/testData/newJ2k/mutableCollections/FunctionParameters.kt @@ -1,8 +1,10 @@ internal class A { - fun foo(nonMutableCollection: Collection?, + fun foo( + nonMutableCollection: Collection?, mutableCollection: MutableCollection, mutableSet: MutableSet, - mutableMap: MutableMap) { + mutableMap: MutableMap + ) { mutableCollection.addAll(nonMutableCollection!!) mutableSet.add(mutableMap.remove("a")) } diff --git a/nj2k/testData/newJ2k/newClassExpression/lineBreaks.kt b/nj2k/testData/newJ2k/newClassExpression/lineBreaks.kt index 0191ba7d5b5..5546ca842fd 100644 --- a/nj2k/testData/newJ2k/newClassExpression/lineBreaks.kt +++ b/nj2k/testData/newJ2k/newClassExpression/lineBreaks.kt @@ -1,8 +1,10 @@ internal class C(p1: Int, p2: Int, p3: Int) internal class User { fun foo() { - C(1, + C( + 1, 2, - 3) + 3 + ) } } \ No newline at end of file diff --git a/nj2k/testData/newJ2k/objectLiteral/MyFrame.kt b/nj2k/testData/newJ2k/objectLiteral/MyFrame.kt index e0a74722156..5edbeb06619 100644 --- a/nj2k/testData/newJ2k/objectLiteral/MyFrame.kt +++ b/nj2k/testData/newJ2k/objectLiteral/MyFrame.kt @@ -20,9 +20,11 @@ internal class Client : Frame() { override fun windowClosing() {} } addWindowListener(a) - addWindowListener(object : WindowAdapter() { - override fun windowClosing() {} - }) + addWindowListener( + object : WindowAdapter() { + override fun windowClosing() {} + } + ) val b: EmptyWindowListener = object : EmptyWindowListener {} val c: EmptyWindowAdapter = object : EmptyWindowAdapter() {} } diff --git a/nj2k/testData/newJ2k/returnStatement/currentMethodBug.kt b/nj2k/testData/newJ2k/returnStatement/currentMethodBug.kt index db3f8b48e0b..3987a658d6b 100644 --- a/nj2k/testData/newJ2k/returnStatement/currentMethodBug.kt +++ b/nj2k/testData/newJ2k/returnStatement/currentMethodBug.kt @@ -5,10 +5,12 @@ internal interface I { internal class C { val `object`: Any? get() { - foo(object : I { - override val int: Int - get() = 0 - }) + foo( + object : I { + override val int: Int + get() = 0 + } + ) return string } diff --git a/nj2k/testData/newJ2k/tryWithResource/WithReturnInAnonymousClass.kt b/nj2k/testData/newJ2k/tryWithResource/WithReturnInAnonymousClass.kt index 7b6b05e8a74..1161f88a93a 100644 --- a/nj2k/testData/newJ2k/tryWithResource/WithReturnInAnonymousClass.kt +++ b/nj2k/testData/newJ2k/tryWithResource/WithReturnInAnonymousClass.kt @@ -11,12 +11,15 @@ class C { @Throws(IOException::class) fun foo() { ByteArrayInputStream(ByteArray(10)).use { stream -> - bar(object : I { - @Throws(IOException::class) - override fun doIt(stream: InputStream): Int { - return stream.available() - } - }, stream) + bar( + object : I { + @Throws(IOException::class) + override fun doIt(stream: InputStream): Int { + return stream.available() + } + }, + stream + ) } } diff --git a/nj2k/testData/newJ2k/tryWithResource/WithReturnInAnonymousClass2.kt b/nj2k/testData/newJ2k/tryWithResource/WithReturnInAnonymousClass2.kt index c03eb1040be..f80525cf2a3 100644 --- a/nj2k/testData/newJ2k/tryWithResource/WithReturnInAnonymousClass2.kt +++ b/nj2k/testData/newJ2k/tryWithResource/WithReturnInAnonymousClass2.kt @@ -11,12 +11,15 @@ class C { @Throws(IOException::class) fun foo(): Int { ByteArrayInputStream(ByteArray(10)).use { stream -> - return bar(object : I { - @Throws(IOException::class) - override fun doIt(stream: InputStream): Int { - return stream.available() - } - }, stream) + return bar( + object : I { + @Throws(IOException::class) + override fun doIt(stream: InputStream): Int { + return stream.available() + } + }, + stream + ) } }