Refactoring: "simplify negated binary expression" is now an inspection
This commit is contained in:
@@ -1 +0,0 @@
|
||||
org.jetbrains.kotlin.idea.intentions.SimplifyNegatedBinaryExpressionIntention
|
||||
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated '==' expression to '!='
|
||||
fun test(n: Int) {
|
||||
!<caret>(0 == 1)
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated '==' expression to '!='
|
||||
fun test(n: Int) {
|
||||
0 != 1
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated '>' expression to '<='
|
||||
fun test(n: Int) {
|
||||
!<caret>(0 > 1)
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated '>' expression to '<='
|
||||
fun test(n: Int) {
|
||||
0 <= 1
|
||||
}
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated '>=' expression to '<'
|
||||
fun test(n: Int) {
|
||||
<caret>!(0 >= 1)
|
||||
}
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated '>=' expression to '<'
|
||||
fun test(n: Int) {
|
||||
0 < 1
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated 'in' expression to '!in'
|
||||
class A(val e: Int) {
|
||||
operator fun contains(i: Int): Boolean = e == i
|
||||
}
|
||||
|
||||
fun test(n: Int) {
|
||||
val a = A(1)
|
||||
<caret>!(0 in a)
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated 'in' expression to '!in'
|
||||
class A(val e: Int) {
|
||||
operator fun contains(i: Int): Boolean = e == i
|
||||
}
|
||||
|
||||
fun test(n: Int) {
|
||||
val a = A(1)
|
||||
0 !in a
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
// IS_APPLICABLE: false
|
||||
infix fun Int.lt(b: Int): Boolean = this < b
|
||||
fun test(n: Int) {
|
||||
<caret>!(1 lt 2)
|
||||
}
|
||||
-93
@@ -1,93 +0,0 @@
|
||||
<problems>
|
||||
|
||||
<problem>
|
||||
<file>notIs.kt</file>
|
||||
<line>3</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/notIs.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Simplify Negated Binary Expression</problem_class>
|
||||
<description>Simplify negated '!is' expression to 'is'</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>notIn.kt</file>
|
||||
<line>8</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/notIn.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Simplify Negated Binary Expression</problem_class>
|
||||
<description>Simplify negated '!in' expression to 'in'</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>notEquals.kt</file>
|
||||
<line>3</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/notEquals.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Simplify Negated Binary Expression</problem_class>
|
||||
<description>Simplify negated '!=' expression to '=='</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>lessThanOrEquals.kt</file>
|
||||
<line>3</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/lessThanOrEquals.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Simplify Negated Binary Expression</problem_class>
|
||||
<description>Simplify negated '<=' expression to '>'</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>lessThan.kt</file>
|
||||
<line>3</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/lessThan.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Simplify Negated Binary Expression</problem_class>
|
||||
<description>Simplify negated '<' expression to '>='</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>is.kt</file>
|
||||
<line>3</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/is.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Simplify Negated Binary Expression</problem_class>
|
||||
<description>Simplify negated 'is' expression to '!is'</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>in.kt</file>
|
||||
<line>8</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/in.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Simplify Negated Binary Expression</problem_class>
|
||||
<description>Simplify negated 'in' expression to '!in'</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>greaterThanOrEquals.kt</file>
|
||||
<line>3</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/greaterThanOrEquals.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Simplify Negated Binary Expression</problem_class>
|
||||
<description>Simplify negated '>=' expression to '<'</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>greaterThan.kt</file>
|
||||
<line>3</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/greaterThan.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Simplify Negated Binary Expression</problem_class>
|
||||
<description>Simplify negated '>' expression to '<='</description>
|
||||
</problem>
|
||||
|
||||
<problem>
|
||||
<file>equals.kt</file>
|
||||
<line>3</line>
|
||||
<module>light_idea_test_case</module>
|
||||
<entry_point TYPE="file" FQNAME="temp:///src/equals.kt" />
|
||||
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Simplify Negated Binary Expression</problem_class>
|
||||
<description>Simplify negated '==' expression to '!='</description>
|
||||
</problem>
|
||||
|
||||
</problems>
|
||||
-1
@@ -1 +0,0 @@
|
||||
// INSPECTION_CLASS: org.jetbrains.kotlin.idea.intentions.SimplifyNegatedBinaryExpressionInspection
|
||||
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated 'is' expression to '!is'
|
||||
fun test(n: Int) {
|
||||
<caret>!(0 is Int)
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated 'is' expression to '!is'
|
||||
fun test(n: Int) {
|
||||
0 !is Int
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated '<' expression to '>='
|
||||
fun test(n: Int) {
|
||||
<caret>!(0 < 1)
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated '<' expression to '>='
|
||||
fun test(n: Int) {
|
||||
0 >= 1
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated '<=' expression to '>'
|
||||
fun test(n: Int) {
|
||||
<caret>!(0 <= 1)
|
||||
}
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated '<=' expression to '>'
|
||||
fun test(n: Int) {
|
||||
0 > 1
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated '!=' expression to '=='
|
||||
fun test(n: Int) {
|
||||
<caret>!(0 != 1)
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated '!=' expression to '=='
|
||||
fun test(n: Int) {
|
||||
0 == 1
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated '!in' expression to 'in'
|
||||
class A(val e: Int) {
|
||||
operator fun contains(i: Int): Boolean = e == i
|
||||
}
|
||||
|
||||
fun test(n: Int) {
|
||||
val a = A(1)
|
||||
<caret>!(0 !in a)
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated '!in' expression to 'in'
|
||||
class A(val e: Int) {
|
||||
operator fun contains(i: Int): Boolean = e == i
|
||||
}
|
||||
|
||||
fun test(n: Int) {
|
||||
val a = A(1)
|
||||
0 in a
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated '!is' expression to 'is'
|
||||
fun test(n: Int) {
|
||||
<caret>!(0 !is Int)
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// INTENTION_TEXT: Simplify negated '!is' expression to 'is'
|
||||
fun test(n: Int) {
|
||||
0 is Int
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
// IS_APPLICABLE: false
|
||||
fun test(n: Int) {
|
||||
!<caret>true
|
||||
}
|
||||
Reference in New Issue
Block a user