Correct "Redundant override" inspection message #KT-25608 Fixed

This commit is contained in:
Toshiaki Kameyama
2018-07-23 13:50:39 +03:00
committed by Mikhail Glukhikh
parent 0f087e354e
commit a9c91099a4
10 changed files with 13 additions and 9 deletions
+1 -1
View File
@@ -2582,7 +2582,7 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
level="WEAK WARNING"/> level="WEAK WARNING"/>
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinRedundantOverrideInspection" <localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinRedundantOverrideInspection"
displayName="Redundant override" displayName="Redundant overriding method"
groupPath="Kotlin" groupPath="Kotlin"
groupName="Redundant constructs" groupName="Redundant constructs"
enabledByDefault="true" enabledByDefault="true"
+1 -1
View File
@@ -2579,7 +2579,7 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
level="WEAK WARNING"/> level="WEAK WARNING"/>
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinRedundantOverrideInspection" <localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinRedundantOverrideInspection"
displayName="Redundant override" displayName="Redundant overriding method"
groupPath="Kotlin" groupPath="Kotlin"
groupName="Redundant constructs" groupName="Redundant constructs"
enabledByDefault="true" enabledByDefault="true"
+1 -1
View File
@@ -2582,7 +2582,7 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
level="WEAK WARNING"/> level="WEAK WARNING"/>
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinRedundantOverrideInspection" <localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinRedundantOverrideInspection"
displayName="Redundant override" displayName="Redundant overriding method"
groupPath="Kotlin" groupPath="Kotlin"
groupName="Redundant constructs" groupName="Redundant constructs"
enabledByDefault="true" enabledByDefault="true"
+1 -1
View File
@@ -2583,7 +2583,7 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
level="WEAK WARNING"/> level="WEAK WARNING"/>
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinRedundantOverrideInspection" <localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinRedundantOverrideInspection"
displayName="Redundant override" displayName="Redundant overriding method"
groupPath="Kotlin" groupPath="Kotlin"
groupName="Redundant constructs" groupName="Redundant constructs"
enabledByDefault="true" enabledByDefault="true"
+1 -1
View File
@@ -2582,7 +2582,7 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
level="WEAK WARNING"/> level="WEAK WARNING"/>
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinRedundantOverrideInspection" <localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinRedundantOverrideInspection"
displayName="Redundant override" displayName="Redundant overriding method"
groupPath="Kotlin" groupPath="Kotlin"
groupName="Redundant constructs" groupName="Redundant constructs"
enabledByDefault="true" enabledByDefault="true"
+1 -1
View File
@@ -2582,7 +2582,7 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
level="WEAK WARNING"/> level="WEAK WARNING"/>
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinRedundantOverrideInspection" <localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinRedundantOverrideInspection"
displayName="Redundant override" displayName="Redundant overriding method"
groupPath="Kotlin" groupPath="Kotlin"
groupName="Redundant constructs" groupName="Redundant constructs"
enabledByDefault="true" enabledByDefault="true"
+1 -1
View File
@@ -2581,7 +2581,7 @@ The Kotlin plugin provides language support in IntelliJ IDEA and Android Studio.
level="WEAK WARNING"/> level="WEAK WARNING"/>
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinRedundantOverrideInspection" <localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinRedundantOverrideInspection"
displayName="Redundant override" displayName="Redundant overriding method"
groupPath="Kotlin" groupPath="Kotlin"
groupName="Redundant constructs" groupName="Redundant constructs"
enabledByDefault="true" enabledByDefault="true"
@@ -54,7 +54,7 @@ class KotlinRedundantOverrideInspection : AbstractKotlinInspection(), CleanupLoc
val descriptor = holder.manager.createProblemDescriptor( val descriptor = holder.manager.createProblemDescriptor(
function, function,
TextRange(modifierList.startOffsetInParent, funKeyword.endOffset - function.startOffset), TextRange(modifierList.startOffsetInParent, funKeyword.endOffset - function.startOffset),
"Redundant override", "Redundant overriding method",
ProblemHighlightType.LIKE_UNUSED_SYMBOL, ProblemHighlightType.LIKE_UNUSED_SYMBOL,
isOnTheFly, isOnTheFly,
RedundantOverrideFix() RedundantOverrideFix()
@@ -77,7 +77,7 @@ class KotlinRedundantOverrideInspection : AbstractKotlinInspection(), CleanupLoc
} }
private class RedundantOverrideFix : LocalQuickFix { private class RedundantOverrideFix : LocalQuickFix {
override fun getName() = "Remove redundant override" override fun getName() = "Remove redundant overriding method"
override fun getFamilyName() = name override fun getFamilyName() = name
override fun applyFix(project: Project, descriptor: ProblemDescriptor) { override fun applyFix(project: Project, descriptor: ProblemDescriptor) {
@@ -1,3 +1,5 @@
// PROBLEM: Redundant overriding method
// FIX: Remove redundant overriding method
open class Foo { open class Foo {
open fun simple() { open fun simple() {
} }
@@ -1,3 +1,5 @@
// PROBLEM: Redundant overriding method
// FIX: Remove redundant overriding method
open class Foo { open class Foo {
open fun simple() { open fun simple() {
} }