Formatter: force keyword to be on exactly next line if the corresponding option is set
This commit is contained in:
@@ -8,6 +8,11 @@ fun f() {
|
||||
} catch (e: E) {
|
||||
} finally {
|
||||
}
|
||||
|
||||
try {
|
||||
} catch (e: E) {
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
||||
// SET_TRUE: CATCH_ON_NEW_LINE
|
||||
|
||||
@@ -12,6 +12,13 @@ fun f() {
|
||||
}
|
||||
finally {
|
||||
}
|
||||
|
||||
try {
|
||||
}
|
||||
catch (e: E) {
|
||||
}
|
||||
finally {
|
||||
}
|
||||
}
|
||||
|
||||
// SET_TRUE: CATCH_ON_NEW_LINE
|
||||
|
||||
@@ -10,6 +10,15 @@ fun f() {
|
||||
} catch (e: E) {
|
||||
} finally {
|
||||
}
|
||||
|
||||
try {
|
||||
}
|
||||
|
||||
catch (e: E) {
|
||||
}
|
||||
|
||||
finally {
|
||||
}
|
||||
}
|
||||
|
||||
// SET_TRUE: CATCH_ON_NEW_LINE
|
||||
|
||||
@@ -5,6 +5,11 @@ fun f() {
|
||||
}
|
||||
|
||||
|
||||
if (true) {
|
||||
} else if (true) {
|
||||
} else {
|
||||
}
|
||||
|
||||
if (true) {
|
||||
} else if (true) {
|
||||
} else {
|
||||
|
||||
@@ -7,6 +7,13 @@ fun f() {
|
||||
}
|
||||
|
||||
|
||||
if (true) {
|
||||
}
|
||||
else if (true) {
|
||||
}
|
||||
else {
|
||||
}
|
||||
|
||||
if (true) {
|
||||
}
|
||||
else if (true) {
|
||||
|
||||
@@ -12,6 +12,15 @@ fun f() {
|
||||
} else {
|
||||
}
|
||||
|
||||
if (true) {
|
||||
}
|
||||
|
||||
else if (true) {
|
||||
}
|
||||
|
||||
else {
|
||||
}
|
||||
|
||||
if (a) 3 else 4
|
||||
|
||||
if (a) 5
|
||||
|
||||
@@ -7,6 +7,10 @@ fun f() {
|
||||
|
||||
} while (true)
|
||||
|
||||
do {
|
||||
|
||||
} while (true)
|
||||
|
||||
do a += 1 while (true)
|
||||
|
||||
do a += 1
|
||||
|
||||
@@ -9,6 +9,11 @@ fun f() {
|
||||
}
|
||||
while (true)
|
||||
|
||||
do {
|
||||
|
||||
}
|
||||
while (true)
|
||||
|
||||
do a += 1 while (true)
|
||||
|
||||
do a += 1
|
||||
|
||||
@@ -8,6 +8,12 @@ fun f() {
|
||||
}
|
||||
while (true)
|
||||
|
||||
do {
|
||||
|
||||
}
|
||||
|
||||
while (true)
|
||||
|
||||
do a += 1 while (true)
|
||||
|
||||
do a += 1
|
||||
|
||||
Reference in New Issue
Block a user