Inspection to replace !string.isBlank() with string.isNotBlank()

#KT-40769 Fixed
This commit is contained in:
Enterman
2020-08-07 15:51:14 +08:00
committed by Vladimir Dolzhenko
parent f9a2d01d57
commit d09b20f11d
19 changed files with 156 additions and 8 deletions
+10
View File
@@ -0,0 +1,10 @@
// WITH_RUNTIME
fun foo(i: Int) {}
fun test(s: String) {
<caret>if (s.isBlank()) {
foo(1)
} else {
foo(2)
}
}
@@ -0,0 +1,10 @@
// WITH_RUNTIME
fun foo(i: Int) {}
fun test(s: String) {
<caret>if (s.isNotBlank()) {
foo(2)
} else {
foo(1)
}
}
@@ -0,0 +1,10 @@
// WITH_RUNTIME
fun foo(i: Int) {}
fun test(s: String) {
<caret>if (s.isNotBlank()) {
foo(1)
} else {
foo(2)
}
}
@@ -0,0 +1,10 @@
// WITH_RUNTIME
fun foo(i: Int) {}
fun test(s: String) {
<caret>if (s.isBlank()) {
foo(2)
} else {
foo(1)
}
}
@@ -0,0 +1,10 @@
// WITH_RUNTIME
fun foo(i: Int) {}
fun test(s: String) {
<caret>if (!s.isBlank()) {
foo(1)
} else {
foo(2)
}
}
@@ -0,0 +1,10 @@
// WITH_RUNTIME
fun foo(i: Int) {}
fun test(s: String) {
<caret>if (s.isBlank()) {
foo(2)
} else {
foo(1)
}
}
@@ -0,0 +1,10 @@
// WITH_RUNTIME
fun foo(i: Int) {}
fun test(s: String) {
<caret>if (!s.isNotBlank()) {
foo(1)
} else {
foo(2)
}
}
@@ -0,0 +1,10 @@
// WITH_RUNTIME
fun foo(i: Int) {}
fun test(s: String) {
<caret>if (s.isNotBlank()) {
foo(2)
} else {
foo(1)
}
}