Improve wording in some inspections

This commit is contained in:
Mikhail Glukhikh
2017-12-26 18:06:40 +03:00
parent 1534488dd1
commit 429c31c010
52 changed files with 83 additions and 93 deletions
@@ -1,4 +1,4 @@
// FIX: Simplify negated '==' expression to '!='
// FIX: Replace negated '==' operation with '!='
fun test(n: Int) {
<caret>!(0 == 1)
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated '==' expression to '!='
// FIX: Replace negated '==' operation with '!='
fun test(n: Int) {
0 != 1
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated '>' expression to '<='
// FIX: Replace negated '>' operation with '<='
fun test(n: Int) {
<caret>!(0 > 1)
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated '>' expression to '<='
// FIX: Replace negated '>' operation with '<='
fun test(n: Int) {
0 <= 1
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated '>=' expression to '<'
// FIX: Replace negated '>=' operation with '<'
fun test(n: Int) {
<caret>!(0 >= 1)
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated '>=' expression to '<'
// FIX: Replace negated '>=' operation with '<'
fun test(n: Int) {
0 < 1
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated 'in' expression to '!in'
// FIX: Replace negated 'in' operation with '!in'
class A(val e: Int) {
operator fun contains(i: Int): Boolean = e == i
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated 'in' expression to '!in'
// FIX: Replace negated 'in' operation with '!in'
class A(val e: Int) {
operator fun contains(i: Int): Boolean = e == i
}
@@ -5,9 +5,8 @@
<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">Negated boolean expression that can be simplified
</problem_class>
<description>Negated expression should be simplified</description>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Negated boolean expression that can be simplified</problem_class>
<description>Negated operation should be simplified</description>
</problem>
<problem>
@@ -15,9 +14,8 @@
<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">Negated boolean expression that can be simplified
</problem_class>
<description>Negated expression should be simplified</description>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Negated boolean expression that can be simplified</problem_class>
<description>Negated operation should be simplified</description>
</problem>
<problem>
@@ -25,9 +23,8 @@
<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">Negated boolean expression that can be simplified
</problem_class>
<description>Negated expression should be simplified</description>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Negated boolean expression that can be simplified</problem_class>
<description>Negated operation should be simplified</description>
</problem>
<problem>
@@ -35,9 +32,8 @@
<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">Negated boolean expression that can be simplified
</problem_class>
<description>Negated expression should be simplified</description>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Negated boolean expression that can be simplified</problem_class>
<description>Negated operation should be simplified</description>
</problem>
<problem>
@@ -45,9 +41,8 @@
<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">Negated boolean expression that can be simplified
</problem_class>
<description>Negated expression should be simplified</description>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Negated boolean expression that can be simplified</problem_class>
<description>Negated operation should be simplified</description>
</problem>
<problem>
@@ -55,9 +50,8 @@
<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">Negated boolean expression that can be simplified
</problem_class>
<description>Negated expression should be simplified</description>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Negated boolean expression that can be simplified</problem_class>
<description>Negated operation should be simplified</description>
</problem>
<problem>
@@ -65,9 +59,8 @@
<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">Negated boolean expression that can be simplified
</problem_class>
<description>Negated expression should be simplified</description>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Negated boolean expression that can be simplified</problem_class>
<description>Negated operation should be simplified</description>
</problem>
<problem>
@@ -75,9 +68,8 @@
<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">Negated boolean expression that can be simplified
</problem_class>
<description>Negated expression should be simplified</description>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Negated boolean expression that can be simplified</problem_class>
<description>Negated operation should be simplified</description>
</problem>
<problem>
@@ -85,9 +77,8 @@
<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">Negated boolean expression that can be simplified
</problem_class>
<description>Negated expression should be simplified</description>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Negated boolean expression that can be simplified</problem_class>
<description>Negated operation should be simplified</description>
</problem>
<problem>
@@ -95,9 +86,8 @@
<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">Negated boolean expression that can be simplified
</problem_class>
<description>Negated expression should be simplified</description>
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Negated boolean expression that can be simplified</problem_class>
<description>Negated operation should be simplified</description>
</problem>
</problems>
@@ -1,4 +1,4 @@
// FIX: Simplify negated 'is' expression to '!is'
// FIX: Replace negated 'is' operation with '!is'
fun test(n: Int) {
<caret>!(0 is Int)
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated 'is' expression to '!is'
// FIX: Replace negated 'is' operation with '!is'
fun test(n: Int) {
0 !is Int
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated '<' expression to '>='
// FIX: Replace negated '<' operation with '>='
fun test(n: Int) {
<caret>!(0 < 1)
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated '<' expression to '>='
// FIX: Replace negated '<' operation with '>='
fun test(n: Int) {
0 >= 1
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated '<=' expression to '>'
// FIX: Replace negated '<=' operation with '>'
fun test(n: Int) {
<caret>!(0 <= 1)
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated '<=' expression to '>'
// FIX: Replace negated '<=' operation with '>'
fun test(n: Int) {
0 > 1
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated '!=' expression to '=='
// FIX: Replace negated '!=' operation with '=='
fun test(n: Int) {
<caret>!(0 != 1)
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated '!=' expression to '=='
// FIX: Replace negated '!=' operation with '=='
fun test(n: Int) {
0 == 1
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated '!in' expression to 'in'
// FIX: Replace negated '!in' operation with 'in'
class A(val e: Int) {
operator fun contains(i: Int): Boolean = e == i
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated '!in' expression to 'in'
// FIX: Replace negated '!in' operation with 'in'
class A(val e: Int) {
operator fun contains(i: Int): Boolean = e == i
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated '!is' expression to 'is'
// FIX: Replace negated '!is' operation with 'is'
fun test(n: Int) {
<caret>!(0 !is Int)
}
@@ -1,4 +1,4 @@
// FIX: Simplify negated '!is' expression to 'is'
// FIX: Replace negated '!is' operation with 'is'
fun test(n: Int) {
0 is Int
}