-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: #413 Reviewed By: cortinico Differential Revision: D58589063 fbshipit-source-id: 701c796a6611b28924e9e69eed97c151729af7df
- Loading branch information
1 parent
cec9b50
commit 334b9a0
Showing
5 changed files
with
144 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
# Original | ||
```kotlin | ||
fun | ||
f ( | ||
a : Int | ||
, b: Double , c:String) { var result = 0 | ||
val aVeryLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongVar = 43 | ||
foo.bar.zed.accept( | ||
|
||
) | ||
|
||
foo( | ||
|
||
) | ||
|
||
foo.bar.zed.accept( | ||
DoSomething.bar() | ||
) | ||
|
||
bar( | ||
ImmutableList.newBuilder().add(1).add(1).add(1).add(1).add(1).add(1).add(1).add(1).add(1).add(1).build()) | ||
|
||
ImmutableList.newBuilder().add(1).add(1).add(1).add(1).add(1).add(1).add(1).add(1).add(1).add(1).build() | ||
} | ||
``` | ||
|
||
# ktfmt | ||
```kotlin | ||
fun f(a: Int, b: Double, c: String) { | ||
var result = 0 | ||
val aVeryLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongVar = | ||
43 | ||
foo.bar.zed.accept() | ||
|
||
foo() | ||
|
||
foo.bar.zed.accept(DoSomething.bar()) | ||
|
||
bar( | ||
ImmutableList.newBuilder() | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.build() | ||
) | ||
|
||
ImmutableList.newBuilder() | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.build() | ||
} | ||
``` | ||
|
||
# ktlint | ||
```kotlin | ||
fun f( | ||
a: Int, | ||
b: Double, | ||
c: String, | ||
) { | ||
var result = 0 | ||
val aVeryLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongVar = 43 | ||
foo.bar.zed.accept() | ||
|
||
foo() | ||
|
||
foo.bar.zed.accept( | ||
DoSomething.bar(), | ||
) | ||
|
||
bar( | ||
ImmutableList | ||
.newBuilder() | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.build(), | ||
) | ||
|
||
ImmutableList | ||
.newBuilder() | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.add(1) | ||
.build() | ||
} | ||
``` | ||
|
||
# IntelliJ | ||
```kotlin | ||
fun | ||
f( | ||
a: Int, b: Double, c: String | ||
) { | ||
var result = 0 | ||
val aVeryLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongVar = 43 | ||
foo.bar.zed.accept( | ||
|
||
) | ||
|
||
foo( | ||
|
||
) | ||
|
||
foo.bar.zed.accept( | ||
DoSomething.bar() | ||
) | ||
|
||
bar( | ||
ImmutableList.newBuilder().add(1).add(1).add(1).add(1).add(1).add(1).add(1).add(1).add(1).add(1).build() | ||
) | ||
|
||
ImmutableList.newBuilder().add(1).add(1).add(1).add(1).add(1).add(1).add(1).add(1).add(1).add(1).build() | ||
} | ||
``` |