From 429c31c010553be5045349396ba6576de4da04d0 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Tue, 26 Dec 2017 18:06:40 +0300 Subject: [PATCH] Improve wording in some inspections --- ...eplaceArrayEqualityOpWithArraysEquals.html | 2 +- ...ReplaceWithOperatorAssignmentInspection.kt | 2 +- ...mplifyNegatedBinaryExpressionInspection.kt | 6 +-- .../IntroduceWhenSubjectInspection.kt | 6 +-- ...ReplaceCallWithBinaryOperatorInspection.kt | 2 +- .../ReplaceGetOrSetInspection.kt | 2 +- .../divSanityTest.kt | 2 +- .../divSanityTest.kt.after | 2 +- .../replaceCallWithBinaryOperator/equals.kt | 2 +- .../equals.kt.after | 2 +- .../replaceCallWithBinaryOperator/greater.kt | 2 +- .../greater.kt.after | 2 +- .../lessEquals.kt | 2 +- .../lessEquals.kt.after | 2 +- .../minusSanityTest.kt | 2 +- .../minusSanityTest.kt.after | 2 +- .../notEquals.kt | 2 +- .../notEquals.kt.after | 2 +- .../notEqualsBrackets.kt | 2 +- .../notEqualsBrackets.kt.after | 2 +- .../notEqualsBracketsComplex.kt | 2 +- .../notEqualsBracketsComplex.kt.after | 2 +- .../plusSanityTest.kt | 2 +- .../plusSanityTest.kt.after | 2 +- .../rangeToSanityTest.kt | 2 +- .../rangeToSanityTest.kt.after | 2 +- .../remSanityTest.kt | 2 +- .../remSanityTest.kt.after | 2 +- .../timesSanityTest.kt | 2 +- .../timesSanityTest.kt.after | 2 +- .../inspectionData/expected.xml | 18 +++---- .../simplifyNegatedBinaryExpression/equals.kt | 2 +- .../equals.kt.after | 2 +- .../greaterThan.kt | 2 +- .../greaterThan.kt.after | 2 +- .../greaterThanOrEquals.kt | 2 +- .../greaterThanOrEquals.kt.after | 2 +- .../simplifyNegatedBinaryExpression/in.kt | 2 +- .../in.kt.after | 2 +- .../inspectionData/expected.xml | 50 ++++++++----------- .../simplifyNegatedBinaryExpression/is.kt | 2 +- .../is.kt.after | 2 +- .../lessThan.kt | 2 +- .../lessThan.kt.after | 2 +- .../lessThanOrEquals.kt | 2 +- .../lessThanOrEquals.kt.after | 2 +- .../notEquals.kt | 2 +- .../notEquals.kt.after | 2 +- .../simplifyNegatedBinaryExpression/notIn.kt | 2 +- .../notIn.kt.after | 2 +- .../simplifyNegatedBinaryExpression/notIs.kt | 2 +- .../notIs.kt.after | 2 +- 52 files changed, 83 insertions(+), 93 deletions(-) diff --git a/idea/resources/inspectionDescriptions/ReplaceArrayEqualityOpWithArraysEquals.html b/idea/resources/inspectionDescriptions/ReplaceArrayEqualityOpWithArraysEquals.html index f7d5dce04b7..a43c15b4bff 100644 --- a/idea/resources/inspectionDescriptions/ReplaceArrayEqualityOpWithArraysEquals.html +++ b/idea/resources/inspectionDescriptions/ReplaceArrayEqualityOpWithArraysEquals.html @@ -1,5 +1,5 @@ -This inspection detects '==' or '!=' operator for arrays that should be replaced with 'Arrays.equals' +This inspection detects '==' or '!=' operator for arrays that should be replaced with 'contentEquals' \ No newline at end of file diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/ReplaceWithOperatorAssignmentInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/ReplaceWithOperatorAssignmentInspection.kt index 770aedc7f12..d12b6de844a 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/ReplaceWithOperatorAssignmentInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/ReplaceWithOperatorAssignmentInspection.kt @@ -55,7 +55,7 @@ class ReplaceWithOperatorAssignmentInspection : AbstractApplicabilityBasedInspec override val defaultFixText = "Replace with operator-assignment" override fun fixText(element: KtBinaryExpression) = - "Replace with ${element.operationReference.operationSignTokenType?.value}= expression" + "Replace with '${element.operationReference.operationSignTokenType?.value}='" private fun checkExpressionRepeat(variableExpression: KtNameReferenceExpression, expression: KtBinaryExpression, bindingContext: BindingContext): Boolean { val descriptor = bindingContext[BindingContext.REFERENCE_TARGET, expression.operationReference]?.containingDeclaration diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/SimplifyNegatedBinaryExpressionInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/SimplifyNegatedBinaryExpressionInspection.kt index 9afe86c3308..9e692a28171 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/SimplifyNegatedBinaryExpressionInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/SimplifyNegatedBinaryExpressionInspection.kt @@ -49,15 +49,15 @@ class SimplifyNegatedBinaryExpressionInspection : AbstractApplicabilityBasedInsp override fun inspectionTarget(element: KtPrefixExpression) = element.operationReference - override fun inspectionText(element: KtPrefixExpression) = "Negated expression should be simplified" + override fun inspectionText(element: KtPrefixExpression) = "Negated operation should be simplified" - override val defaultFixText = "Simplify negated expression" + override val defaultFixText = "Simplify negated operation" override fun fixText(element: KtPrefixExpression): String { val expression = KtPsiUtil.deparenthesize(element.baseExpression) as? KtOperationExpression ?: return defaultFixText val operation = expression.operationReference.getReferencedNameElementType() as? KtSingleValueToken ?: return defaultFixText val negatedOperation = operation.negate() ?: return defaultFixText - return "Simplify negated '${operation.value}' expression to '${negatedOperation.value}'" + return "Replace negated '${operation.value}' operation with '${negatedOperation.value}'" } override fun isApplicable(element: KtPrefixExpression): Boolean { diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/branchedTransformations/IntroduceWhenSubjectInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/branchedTransformations/IntroduceWhenSubjectInspection.kt index bd5fc72b34f..5738fc6230c 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/branchedTransformations/IntroduceWhenSubjectInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/branchedTransformations/IntroduceWhenSubjectInspection.kt @@ -31,13 +31,13 @@ class IntroduceWhenSubjectInspection : AbstractApplicabilityBasedInspectionequals(2) \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/equals.kt.after b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/equals.kt.after index dd570c9491a..0c5be52b621 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/equals.kt.after +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/equals.kt.after @@ -1,3 +1,3 @@ -// FIX: Replace with '==' operator +// FIX: Replace with '==' val x = 2 == 2 \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/greater.kt b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/greater.kt index 71749f0ed96..14d2aac4c8d 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/greater.kt +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/greater.kt @@ -1,3 +1,3 @@ -// FIX: Replace with '>' operator +// FIX: Replace with '>' val x = 3.compareTo(2) > 0 \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/greater.kt.after b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/greater.kt.after index df2c57aa1ed..fb167f9093c 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/greater.kt.after +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/greater.kt.after @@ -1,3 +1,3 @@ -// FIX: Replace with '>' operator +// FIX: Replace with '>' val x = 3 > 2 \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/lessEquals.kt b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/lessEquals.kt index d59ce5794f0..c874c72f5d1 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/lessEquals.kt +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/lessEquals.kt @@ -1,3 +1,3 @@ -// FIX: Replace with '<=' operator +// FIX: Replace with '<=' val x = 0 >= 4.compareTo(5) \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/lessEquals.kt.after b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/lessEquals.kt.after index 35926732057..9cf46dc65f7 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/lessEquals.kt.after +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/lessEquals.kt.after @@ -1,3 +1,3 @@ -// FIX: Replace with '<=' operator +// FIX: Replace with '<=' val x = 4 <= 5 \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/minusSanityTest.kt b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/minusSanityTest.kt index 27b077967eb..6d5d0825687 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/minusSanityTest.kt +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/minusSanityTest.kt @@ -1,4 +1,4 @@ -// FIX: Replace with '-' operator +// FIX: Replace with '-' fun test() { class Test { operator fun minus(a: Int): Test = Test() diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/minusSanityTest.kt.after b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/minusSanityTest.kt.after index 4cb0c716356..1d30a82be51 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/minusSanityTest.kt.after +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/minusSanityTest.kt.after @@ -1,4 +1,4 @@ -// FIX: Replace with '-' operator +// FIX: Replace with '-' fun test() { class Test { operator fun minus(a: Int): Test = Test() diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEquals.kt b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEquals.kt index 79d3c4684e0..a017420ef1c 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEquals.kt +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEquals.kt @@ -1,3 +1,3 @@ -// FIX: Replace with '!=' operator +// FIX: Replace with '!=' val x = !2.equals(3) \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEquals.kt.after b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEquals.kt.after index 0d28e41e266..617b7f0dfbc 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEquals.kt.after +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEquals.kt.after @@ -1,3 +1,3 @@ -// FIX: Replace with '!=' operator +// FIX: Replace with '!=' val x = 2 != 3 \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBrackets.kt b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBrackets.kt index 3b0b90e44a1..edfac270a94 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBrackets.kt +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBrackets.kt @@ -1,3 +1,3 @@ -// FIX: Replace with '!=' operator +// FIX: Replace with '!=' val x = !(2.equals(3)) \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBrackets.kt.after b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBrackets.kt.after index 0d28e41e266..617b7f0dfbc 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBrackets.kt.after +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBrackets.kt.after @@ -1,3 +1,3 @@ -// FIX: Replace with '!=' operator +// FIX: Replace with '!=' val x = 2 != 3 \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBracketsComplex.kt b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBracketsComplex.kt index 2cd0bdeeee5..487e8ee08c9 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBracketsComplex.kt +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBracketsComplex.kt @@ -1,3 +1,3 @@ -// FIX: Replace with '==' operator +// FIX: Replace with '==' val x = !(2.equals(3) && 4.equals(5)) \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBracketsComplex.kt.after b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBracketsComplex.kt.after index 3c7b4a23974..ca85056ecfc 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBracketsComplex.kt.after +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBracketsComplex.kt.after @@ -1,3 +1,3 @@ -// FIX: Replace with '==' operator +// FIX: Replace with '==' val x = !(2 == 3 && 4.equals(5)) \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/plusSanityTest.kt b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/plusSanityTest.kt index 51201b36339..b3ee41f6757 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/plusSanityTest.kt +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/plusSanityTest.kt @@ -1,4 +1,4 @@ -// FIX: Replace with '+' operator +// FIX: Replace with '+' fun test() { class Test { operator fun plus(a: Int): Test = Test() diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/plusSanityTest.kt.after b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/plusSanityTest.kt.after index 2ed7f2e1e75..9ab892c4b25 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/plusSanityTest.kt.after +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/plusSanityTest.kt.after @@ -1,4 +1,4 @@ -// FIX: Replace with '+' operator +// FIX: Replace with '+' fun test() { class Test { operator fun plus(a: Int): Test = Test() diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/rangeToSanityTest.kt b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/rangeToSanityTest.kt index 51b4bac4c19..9a179466aa2 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/rangeToSanityTest.kt +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/rangeToSanityTest.kt @@ -1,4 +1,4 @@ -// FIX: Replace with '..' operator +// FIX: Replace with '..' fun test() { class Test { operator fun rangeTo(a: Int): Test = Test() diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/rangeToSanityTest.kt.after b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/rangeToSanityTest.kt.after index 2bac3b9c05b..4ad0783e1c8 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/rangeToSanityTest.kt.after +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/rangeToSanityTest.kt.after @@ -1,4 +1,4 @@ -// FIX: Replace with '..' operator +// FIX: Replace with '..' fun test() { class Test { operator fun rangeTo(a: Int): Test = Test() diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt index 19d14fbb3aa..f24bc8e1730 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt @@ -1,4 +1,4 @@ -// FIX: Replace with '%' operator +// FIX: Replace with '%' fun test() { class Test { diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt.after b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt.after index f4018d5224a..7cebd3a5bac 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt.after +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt.after @@ -1,4 +1,4 @@ -// FIX: Replace with '%' operator +// FIX: Replace with '%' fun test() { class Test { diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/timesSanityTest.kt b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/timesSanityTest.kt index 4d6360550b0..7b3e0b0eeda 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/timesSanityTest.kt +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/timesSanityTest.kt @@ -1,4 +1,4 @@ -// FIX: Replace with '*' operator +// FIX: Replace with '*' fun test() { class Test { operator fun times(a: Int): Test = Test() diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/timesSanityTest.kt.after b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/timesSanityTest.kt.after index 4348f6be10a..89229e01ec3 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/timesSanityTest.kt.after +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/timesSanityTest.kt.after @@ -1,4 +1,4 @@ -// FIX: Replace with '*' operator +// FIX: Replace with '*' fun test() { class Test { operator fun times(a: Int): Test = Test() diff --git a/idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/inspectionData/expected.xml b/idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/inspectionData/expected.xml index 77d4af09b97..eab0d0ee3a4 100644 --- a/idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/inspectionData/expected.xml +++ b/idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/inspectionData/expected.xml @@ -5,7 +5,7 @@ light_idea_test_case Explicit 'get' or 'set' call - Call replaceable with indexing operator + Should be replaced with indexing @@ -14,7 +14,7 @@ light_idea_test_case Explicit 'get' or 'set' call - Call replaceable with indexing operator + Should be replaced with indexing @@ -23,7 +23,7 @@ light_idea_test_case Explicit 'get' or 'set' call - Call replaceable with indexing operator + Should be replaced with indexing @@ -32,7 +32,7 @@ light_idea_test_case Explicit 'get' or 'set' call - Call replaceable with indexing operator + Should be replaced with indexing @@ -41,7 +41,7 @@ light_idea_test_case Explicit 'get' or 'set' call - Call replaceable with indexing operator + Should be replaced with indexing @@ -50,7 +50,7 @@ light_idea_test_case Explicit 'get' or 'set' call - Call replaceable with indexing operator + Should be replaced with indexing @@ -59,7 +59,7 @@ light_idea_test_case Explicit 'get' or 'set' call - Call replaceable with indexing operator + Should be replaced with indexing @@ -68,7 +68,7 @@ light_idea_test_case Explicit 'get' or 'set' call - Call replaceable with indexing operator + Should be replaced with indexing @@ -77,6 +77,6 @@ light_idea_test_case Explicit 'get' or 'set' call - Call replaceable with indexing operator + Should be replaced with indexing diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/equals.kt b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/equals.kt index be75483ad69..a39732a10ab 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/equals.kt +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/equals.kt @@ -1,4 +1,4 @@ -// FIX: Simplify negated '==' expression to '!=' +// FIX: Replace negated '==' operation with '!=' fun test(n: Int) { !(0 == 1) } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/equals.kt.after b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/equals.kt.after index ae3fe949c8c..9560fac1bd4 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/equals.kt.after +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/equals.kt.after @@ -1,4 +1,4 @@ -// FIX: Simplify negated '==' expression to '!=' +// FIX: Replace negated '==' operation with '!=' fun test(n: Int) { 0 != 1 } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThan.kt b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThan.kt index e59f13cb799..0f1dcc47076 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThan.kt +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThan.kt @@ -1,4 +1,4 @@ -// FIX: Simplify negated '>' expression to '<=' +// FIX: Replace negated '>' operation with '<=' fun test(n: Int) { !(0 > 1) } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThan.kt.after b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThan.kt.after index b12e93b4619..6216271e357 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThan.kt.after +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThan.kt.after @@ -1,4 +1,4 @@ -// FIX: Simplify negated '>' expression to '<=' +// FIX: Replace negated '>' operation with '<=' fun test(n: Int) { 0 <= 1 } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThanOrEquals.kt b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThanOrEquals.kt index b9998fbd72a..4a272ed6984 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThanOrEquals.kt +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThanOrEquals.kt @@ -1,4 +1,4 @@ -// FIX: Simplify negated '>=' expression to '<' +// FIX: Replace negated '>=' operation with '<' fun test(n: Int) { !(0 >= 1) } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThanOrEquals.kt.after b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThanOrEquals.kt.after index e1f9d13c132..e19bba353a5 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThanOrEquals.kt.after +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThanOrEquals.kt.after @@ -1,4 +1,4 @@ -// FIX: Simplify negated '>=' expression to '<' +// FIX: Replace negated '>=' operation with '<' fun test(n: Int) { 0 < 1 } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/in.kt b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/in.kt index f71e0a7ff3d..66480343cca 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/in.kt +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/in.kt @@ -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 } diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/in.kt.after b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/in.kt.after index 3ddaf9c4861..9665ad7ba99 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/in.kt.after +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/in.kt.after @@ -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 } diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/inspectionData/expected.xml b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/inspectionData/expected.xml index 3fd0b8e0540..a57eeebe9de 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/inspectionData/expected.xml +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/inspectionData/expected.xml @@ -5,9 +5,8 @@ 3 light_idea_test_case - Negated boolean expression that can be simplified - - Negated expression should be simplified + Negated boolean expression that can be simplified + Negated operation should be simplified @@ -15,9 +14,8 @@ 8 light_idea_test_case - Negated boolean expression that can be simplified - - Negated expression should be simplified + Negated boolean expression that can be simplified + Negated operation should be simplified @@ -25,9 +23,8 @@ 3 light_idea_test_case - Negated boolean expression that can be simplified - - Negated expression should be simplified + Negated boolean expression that can be simplified + Negated operation should be simplified @@ -35,9 +32,8 @@ 3 light_idea_test_case - Negated boolean expression that can be simplified - - Negated expression should be simplified + Negated boolean expression that can be simplified + Negated operation should be simplified @@ -45,9 +41,8 @@ 3 light_idea_test_case - Negated boolean expression that can be simplified - - Negated expression should be simplified + Negated boolean expression that can be simplified + Negated operation should be simplified @@ -55,9 +50,8 @@ 3 light_idea_test_case - Negated boolean expression that can be simplified - - Negated expression should be simplified + Negated boolean expression that can be simplified + Negated operation should be simplified @@ -65,9 +59,8 @@ 8 light_idea_test_case - Negated boolean expression that can be simplified - - Negated expression should be simplified + Negated boolean expression that can be simplified + Negated operation should be simplified @@ -75,9 +68,8 @@ 3 light_idea_test_case - Negated boolean expression that can be simplified - - Negated expression should be simplified + Negated boolean expression that can be simplified + Negated operation should be simplified @@ -85,9 +77,8 @@ 3 light_idea_test_case - Negated boolean expression that can be simplified - - Negated expression should be simplified + Negated boolean expression that can be simplified + Negated operation should be simplified @@ -95,9 +86,8 @@ 3 light_idea_test_case - Negated boolean expression that can be simplified - - Negated expression should be simplified + Negated boolean expression that can be simplified + Negated operation should be simplified \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/is.kt b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/is.kt index aae24581171..2b2f1712274 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/is.kt +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/is.kt @@ -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) } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/is.kt.after b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/is.kt.after index 08ca72e4e6f..82c32e9f23d 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/is.kt.after +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/is.kt.after @@ -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 } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThan.kt b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThan.kt index 4e798fe689a..4f809b5282f 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThan.kt +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThan.kt @@ -1,4 +1,4 @@ -// FIX: Simplify negated '<' expression to '>=' +// FIX: Replace negated '<' operation with '>=' fun test(n: Int) { !(0 < 1) } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThan.kt.after b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThan.kt.after index 1c4fa893cc9..0152b012bf2 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThan.kt.after +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThan.kt.after @@ -1,4 +1,4 @@ -// FIX: Simplify negated '<' expression to '>=' +// FIX: Replace negated '<' operation with '>=' fun test(n: Int) { 0 >= 1 } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThanOrEquals.kt b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThanOrEquals.kt index b8ff0839d19..3057c97de9f 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThanOrEquals.kt +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThanOrEquals.kt @@ -1,4 +1,4 @@ -// FIX: Simplify negated '<=' expression to '>' +// FIX: Replace negated '<=' operation with '>' fun test(n: Int) { !(0 <= 1) } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThanOrEquals.kt.after b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThanOrEquals.kt.after index f6e15fa7d2d..4b912395a5d 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThanOrEquals.kt.after +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThanOrEquals.kt.after @@ -1,4 +1,4 @@ -// FIX: Simplify negated '<=' expression to '>' +// FIX: Replace negated '<=' operation with '>' fun test(n: Int) { 0 > 1 } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notEquals.kt b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notEquals.kt index a769cab4c83..0f8d73c6d69 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notEquals.kt +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notEquals.kt @@ -1,4 +1,4 @@ -// FIX: Simplify negated '!=' expression to '==' +// FIX: Replace negated '!=' operation with '==' fun test(n: Int) { !(0 != 1) } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notEquals.kt.after b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notEquals.kt.after index df09f2a60ed..a1410e4aa77 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notEquals.kt.after +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notEquals.kt.after @@ -1,4 +1,4 @@ -// FIX: Simplify negated '!=' expression to '==' +// FIX: Replace negated '!=' operation with '==' fun test(n: Int) { 0 == 1 } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIn.kt b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIn.kt index 1eebab4ba7c..a4e5fbb617e 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIn.kt +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIn.kt @@ -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 } diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIn.kt.after b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIn.kt.after index 98d9ada1495..60e8e4f9933 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIn.kt.after +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIn.kt.after @@ -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 } diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIs.kt b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIs.kt index e90b4dfc910..43a36f8213f 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIs.kt +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIs.kt @@ -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) } \ No newline at end of file diff --git a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIs.kt.after b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIs.kt.after index 5a68b4ab282..567f0e557ed 100644 --- a/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIs.kt.after +++ b/idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIs.kt.after @@ -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 } \ No newline at end of file