Add inspection for converting !collection.isEmpty() -> isNotEmpty()
#KT-27556 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
538a746df9
commit
7b43d5c972
+1
@@ -0,0 +1 @@
|
||||
org.jetbrains.kotlin.idea.inspections.ReplaceNegatedIsEmptyWithIsNotEmptyInspection
|
||||
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
// FIX: Replace negated 'isEmpty' with 'isNotEmpty'
|
||||
|
||||
fun test() {
|
||||
val list = listOf(1,2,3)
|
||||
if (!list.<caret>isEmpty()) {
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// WITH_RUNTIME
|
||||
// FIX: Replace negated 'isEmpty' with 'isNotEmpty'
|
||||
|
||||
fun test() {
|
||||
val list = listOf(1,2,3)
|
||||
if (list.isNotEmpty()) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user