mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] register editorAttributes instead of hardcoded ProblemHighlightType.LIKE_UNUSED_SYMBOL (KTIJ-22110)
so user's settings are respected GitOrigin-RevId: e6ccce9c874b4e07e316a984ded9b0d0d609f11f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b3417f0217
commit
ace14d657d
+4
-2
@@ -3,7 +3,10 @@
|
||||
package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
import com.intellij.codeInsight.intention.FileModifier
|
||||
import com.intellij.codeInspection.*
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.LocalQuickFix
|
||||
import com.intellij.codeInspection.ProblemDescriptor
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
@@ -99,7 +102,6 @@ class CanBeParameterInspection : AbstractKotlinInspection(), CleanupLocalInspect
|
||||
holder.registerProblem(
|
||||
valOrVar,
|
||||
KotlinBundle.message("constructor.parameter.is.never.used.as.a.property"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
RemoveValVarFix(parameter)
|
||||
)
|
||||
})
|
||||
|
||||
+1
-3
@@ -1,10 +1,9 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
import com.intellij.codeInspection.LocalQuickFix
|
||||
import com.intellij.codeInspection.ProblemDescriptor
|
||||
import com.intellij.codeInspection.ProblemHighlightType.LIKE_UNUSED_SYMBOL
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||
@@ -30,7 +29,6 @@ class ExplicitThisInspection : AbstractKotlinInspection() {
|
||||
holder.registerProblem(
|
||||
thisExpression,
|
||||
KotlinBundle.message("redundant.explicit.this"),
|
||||
LIKE_UNUSED_SYMBOL,
|
||||
ExplicitThisExpressionFix(thisExpression.text)
|
||||
)
|
||||
}
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ class KotlinRedundantOverrideInspection : AbstractKotlinInspection(), CleanupLoc
|
||||
function,
|
||||
TextRange(modifierList.startOffsetInParent, funKeyword.endOffset - function.startOffset),
|
||||
KotlinBundle.message("redundant.overriding.method"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
|
||||
isOnTheFly,
|
||||
RedundantOverrideFix()
|
||||
)
|
||||
|
||||
+1
-1
@@ -121,7 +121,7 @@ class KotlinUnusedImportInspection : AbstractKotlinInspection() {
|
||||
KotlinBundle.message("unused.import.directive"),
|
||||
isOnTheFly,
|
||||
fixes.toTypedArray(),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL
|
||||
ProblemHighlightType.GENERIC_ERROR_OR_WARNING
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -2,7 +2,10 @@
|
||||
|
||||
package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
import com.intellij.codeInspection.*
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.LocalQuickFix
|
||||
import com.intellij.codeInspection.ProblemDescriptor
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
@@ -42,7 +45,6 @@ class RedundantCompanionReferenceInspection : AbstractKotlinInspection(), Cleanu
|
||||
holder.registerProblem(
|
||||
expression,
|
||||
KotlinBundle.message("redundant.companion.reference"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
RemoveRedundantCompanionReferenceFix()
|
||||
)
|
||||
}
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ class RedundantElvisReturnNullInspection : AbstractKotlinInspection(), CleanupLo
|
||||
holder.registerProblem(
|
||||
binaryExpression,
|
||||
KotlinBundle.message("inspection.redundant.elvis.return.null.descriptor"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
|
||||
TextRange(binaryExpression.operationReference.startOffset, right.endOffset).shiftLeft(binaryExpression.startOffset),
|
||||
RemoveRedundantElvisReturnNull()
|
||||
)
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ class RedundantEmptyInitializerBlockInspection : AbstractKotlinInspection(), Cle
|
||||
holder.registerProblem(
|
||||
initializer,
|
||||
KotlinBundle.message("redundant.empty.initializer.block"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
|
||||
RemoveInitializerBlockFix()
|
||||
)
|
||||
})
|
||||
|
||||
+4
-2
@@ -2,7 +2,10 @@
|
||||
|
||||
package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
import com.intellij.codeInspection.*
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.LocalQuickFix
|
||||
import com.intellij.codeInspection.ProblemDescriptor
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.kotlin.diagnostics.Severity
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
@@ -21,7 +24,6 @@ class RedundantEnumConstructorInvocationInspection : AbstractKotlinInspection(),
|
||||
holder.registerProblem(
|
||||
valueArgumentList,
|
||||
KotlinBundle.message("redundant.enum.constructor.invocation"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
RemoveEnumConstructorInvocationFix()
|
||||
)
|
||||
})
|
||||
|
||||
-2
@@ -4,7 +4,6 @@ package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.IntentionWrapper
|
||||
import com.intellij.codeInspection.ProblemHighlightType
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import org.jetbrains.kotlin.KtNodeTypes
|
||||
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
@@ -27,7 +26,6 @@ class RedundantExplicitTypeInspection : AbstractKotlinInspection(), CleanupLocal
|
||||
holder.registerProblem(
|
||||
typeReference,
|
||||
KotlinBundle.message("explicitly.given.type.is.redundant.here"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
IntentionWrapper(RemoveExplicitTypeIntention())
|
||||
)
|
||||
}
|
||||
|
||||
+1
-1
@@ -38,6 +38,7 @@ import org.jetbrains.kotlin.utils.addToStdlib.safeAs
|
||||
import javax.swing.JPanel
|
||||
|
||||
class RedundantInnerClassModifierInspection : AbstractKotlinInspection(), CleanupLocalInspectionTool {
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
var ignorableAnnotations = OrderedSet(listOf(JUnitCommonClassNames.ORG_JUNIT_JUPITER_API_NESTED))
|
||||
|
||||
override fun createOptionsPanel(): JPanel = SpecialAnnotationsUtil.createSpecialAnnotationsListControl(
|
||||
@@ -55,7 +56,6 @@ class RedundantInnerClassModifierInspection : AbstractKotlinInspection(), Cleanu
|
||||
holder.registerProblem(
|
||||
innerModifier,
|
||||
KotlinBundle.message("inspection.redundant.inner.class.modifier.descriptor"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
RemoveInnerModifierFix()
|
||||
)
|
||||
})
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ class RedundantLambdaArrowInspection : AbstractKotlinInspection(), CleanupLocalI
|
||||
functionLiteral,
|
||||
TextRange((singleParameter?.startOffset ?: arrow.startOffset) - startOffset, arrow.endOffset - startOffset),
|
||||
KotlinBundle.message("redundant.lambda.arrow"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
|
||||
isOnTheFly,
|
||||
DeleteFix()
|
||||
)
|
||||
|
||||
+5
-3
@@ -1,8 +1,11 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
import com.intellij.codeInspection.*
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.IntentionWrapper
|
||||
import com.intellij.codeInspection.LocalInspectionToolSession
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.core.implicitModality
|
||||
@@ -22,7 +25,6 @@ class RedundantModalityModifierInspection : AbstractKotlinInspection(), CleanupL
|
||||
holder.registerProblem(
|
||||
modalityModifier,
|
||||
KotlinBundle.message("redundant.modality.modifier"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
IntentionWrapper(RemoveModifierFix(declaration, implicitModality, isRedundant = true))
|
||||
)
|
||||
}
|
||||
|
||||
-2
@@ -4,7 +4,6 @@ package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.IntentionWrapper
|
||||
import com.intellij.codeInspection.ProblemHighlightType
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
@@ -24,7 +23,6 @@ class RedundantReturnLabelInspection : AbstractKotlinInspection(), CleanupLocalI
|
||||
holder.registerProblem(
|
||||
label,
|
||||
KotlinBundle.message("redundant.0", labelName),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
IntentionWrapper(RemoveReturnLabelFix(returnExpression, labelName)),
|
||||
)
|
||||
},
|
||||
|
||||
+1
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
@@ -28,7 +28,6 @@ class RedundantSemicolonInspection : AbstractKotlinInspection(), CleanupLocalIns
|
||||
holder.registerProblem(
|
||||
element,
|
||||
KotlinBundle.message("redundant.semicolon"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
Fix
|
||||
)
|
||||
}
|
||||
|
||||
+4
-2
@@ -2,7 +2,10 @@
|
||||
|
||||
package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
import com.intellij.codeInspection.*
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.IntentionWrapper
|
||||
import com.intellij.codeInspection.LocalInspectionToolSession
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
import org.jetbrains.kotlin.config.LanguageFeature
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
@@ -43,7 +46,6 @@ class RedundantSuspendModifierInspection : AbstractKotlinInspection(), CleanupLo
|
||||
holder.registerProblem(
|
||||
suspendModifier,
|
||||
KotlinBundle.message("redundant.suspend.modifier"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
IntentionWrapper(RemoveModifierFixBase(function, KtTokens.SUSPEND_KEYWORD, isRedundant = true))
|
||||
)
|
||||
})
|
||||
|
||||
+5
-3
@@ -1,8 +1,11 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
import com.intellij.codeInspection.*
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.LocalQuickFix
|
||||
import com.intellij.codeInspection.ProblemDescriptor
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
@@ -32,7 +35,6 @@ class RedundantUnitExpressionInspection : AbstractKotlinInspection(), CleanupLoc
|
||||
holder.registerProblem(
|
||||
expression,
|
||||
KotlinBundle.message("redundant.unit"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
RemoveRedundantUnitFix()
|
||||
)
|
||||
}
|
||||
|
||||
+1
-3
@@ -1,10 +1,9 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.IntentionWrapper
|
||||
import com.intellij.codeInspection.ProblemHighlightType
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
@@ -24,7 +23,6 @@ class RedundantUnitReturnTypeInspection : AbstractKotlinInspection(), CleanupLoc
|
||||
holder.registerProblem(
|
||||
typeElement,
|
||||
KotlinBundle.message("redundant.unit.return.type"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
IntentionWrapper(RemoveExplicitTypeIntention())
|
||||
)
|
||||
}
|
||||
|
||||
+5
-7
@@ -1,14 +1,13 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
import com.intellij.codeInspection.*
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.IntentionWrapper
|
||||
import com.intellij.codeInspection.LocalInspectionToolSession
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
import org.jetbrains.kotlin.config.AnalysisFlags
|
||||
import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.DescriptorVisibilities
|
||||
import org.jetbrains.kotlin.descriptors.DescriptorVisibility
|
||||
import org.jetbrains.kotlin.config.ExplicitApiMode
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
@@ -58,7 +57,6 @@ class RedundantVisibilityModifierInspection : AbstractKotlinInspection(), Cleanu
|
||||
holder.registerProblem(
|
||||
visibilityModifier,
|
||||
KotlinBundle.message("redundant.visibility.modifier"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
IntentionWrapper(RemoveModifierFix(declaration, redundantVisibility, isRedundant = true))
|
||||
)
|
||||
})
|
||||
|
||||
+4
-2
@@ -2,7 +2,10 @@
|
||||
|
||||
package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
import com.intellij.codeInspection.*
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.LocalQuickFix
|
||||
import com.intellij.codeInspection.ProblemDescriptor
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
@@ -64,7 +67,6 @@ class RedundantWithInspection : AbstractKotlinInspection(), CleanupLocalInspecti
|
||||
holder.registerProblem(
|
||||
callee,
|
||||
KotlinBundle.message("inspection.redundant.with.display.name"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
quickfix
|
||||
)
|
||||
}
|
||||
|
||||
+4
-2
@@ -2,7 +2,10 @@
|
||||
|
||||
package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
import com.intellij.codeInspection.*
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.LocalQuickFix
|
||||
import com.intellij.codeInspection.ProblemDescriptor
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
import org.jetbrains.kotlin.descriptors.ClassConstructorDescriptor
|
||||
@@ -33,7 +36,6 @@ class RemoveEmptyParenthesesFromAnnotationEntryInspection : AbstractKotlinInspec
|
||||
holder.registerProblem(
|
||||
list,
|
||||
KotlinBundle.message("parentheses.should.be.removed"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
RemoveEmptyParenthesesFromAnnotationEntryFix()
|
||||
)
|
||||
})
|
||||
|
||||
+3
-4
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.jetbrains.kotlin.descriptors.ClassKind
|
||||
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyzeAsReplacement
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyze
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.safeAnalyzeNonSourceRootCode
|
||||
import org.jetbrains.kotlin.idea.core.ShortenReferences
|
||||
import org.jetbrains.kotlin.idea.core.compareDescriptors
|
||||
import org.jetbrains.kotlin.idea.core.unwrapIfFakeOverride
|
||||
@@ -22,7 +22,6 @@ import org.jetbrains.kotlin.idea.imports.importableFqName
|
||||
import org.jetbrains.kotlin.idea.intentions.isReferenceToBuiltInEnumFunction
|
||||
import org.jetbrains.kotlin.idea.references.mainReference
|
||||
import org.jetbrains.kotlin.idea.references.resolveToDescriptors
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.safeAnalyzeNonSourceRootCode
|
||||
import org.jetbrains.kotlin.idea.util.getResolutionScope
|
||||
import org.jetbrains.kotlin.idea.util.hasNotReceiver
|
||||
import org.jetbrains.kotlin.incremental.components.NoLookupLocation
|
||||
@@ -196,7 +195,7 @@ private fun reportProblem(holder: ProblemsHolder, element: KtElement) {
|
||||
holder.registerProblem(
|
||||
element,
|
||||
KotlinBundle.message("redundant.qualifier.name"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
|
||||
TextRange.from(firstChild.startOffsetInParent, firstChild.textLength + 1),
|
||||
RemoveRedundantQualifierNameQuickFix()
|
||||
)
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ class RemoveRedundantSpreadOperatorInspection : AbstractKotlinInspection(), Clea
|
||||
argument,
|
||||
TextRange(startOffset, endOffset),
|
||||
KotlinBundle.message("remove.redundant.spread.operator.quickfix.text"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
|
||||
isOnTheFly,
|
||||
RemoveRedundantSpreadOperatorQuickfix()
|
||||
)
|
||||
|
||||
-2
@@ -4,7 +4,6 @@ package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.IntentionWrapper
|
||||
import com.intellij.codeInspection.ProblemHighlightType
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
@@ -23,7 +22,6 @@ class RemoveSetterParameterTypeInspection : AbstractKotlinInspection(), CleanupL
|
||||
holder.registerProblem(
|
||||
typeReference,
|
||||
KotlinBundle.message("redundant.setter.parameter.type"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
IntentionWrapper(RemoveExplicitTypeIntention())
|
||||
)
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
@@ -20,7 +20,6 @@ class RemoveToStringInStringTemplateInspection : AbstractKotlinInspection(), Cle
|
||||
holder.registerProblem(
|
||||
selectorExpression,
|
||||
KotlinBundle.message("redundant.tostring.call.in.string.template"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
RemoveToStringFix()
|
||||
)
|
||||
})
|
||||
|
||||
+4
-3
@@ -1,7 +1,10 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
import com.intellij.codeInspection.*
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.LocalQuickFix
|
||||
import com.intellij.codeInspection.ProblemDescriptor
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.psi.PsiElementVisitor
|
||||
import com.intellij.psi.SmartPsiElementPointer
|
||||
@@ -126,7 +129,6 @@ class UnnecessaryOptInAnnotationInspection : AbstractKotlinInspection(), Cleanup
|
||||
holder.registerProblem(
|
||||
annotationEntry,
|
||||
KotlinBundle.message("inspection.unnecessary.opt_in.redundant.annotation"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
RemoveAnnotationEntry()
|
||||
)
|
||||
} else {
|
||||
@@ -140,7 +142,6 @@ class UnnecessaryOptInAnnotationInspection : AbstractKotlinInspection(), Cleanup
|
||||
"inspection.unnecessary.opt_in.redundant.marker",
|
||||
marker.fqName.shortName().render()
|
||||
),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
RemoveAnnotationArgumentOrEntireEntry()
|
||||
)
|
||||
}
|
||||
|
||||
+1
-3
@@ -1,10 +1,9 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
import com.intellij.codeInspection.IntentionWrapper
|
||||
import com.intellij.codeInspection.LocalInspectionToolSession
|
||||
import com.intellij.codeInspection.ProblemHighlightType
|
||||
import com.intellij.codeInspection.ProblemsHolder
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyzeWithContent
|
||||
@@ -25,7 +24,6 @@ class UnusedMainParameterInspection : AbstractKotlinInspection() {
|
||||
holder.registerProblem(
|
||||
parameter,
|
||||
KotlinBundle.message("since.kotlin.1.3.main.parameter.is.not.necessary"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
IntentionWrapper(RemoveUnusedFunctionParameterFix(parameter))
|
||||
)
|
||||
}
|
||||
|
||||
-1
@@ -110,7 +110,6 @@ class UnusedReceiverParameterInspection : AbstractKotlinInspection(), CleanupLoc
|
||||
holder.registerProblem(
|
||||
receiverTypeReference,
|
||||
KotlinBundle.message("inspection.unused.receiver.parameter"),
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
RemoveReceiverFix(inSameClass)
|
||||
)
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.inspections
|
||||
|
||||
@@ -39,6 +39,8 @@ import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.RootKindFilter
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.languageVersionSettings
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.matches
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.scope.KotlinSourceFilterScope
|
||||
import org.jetbrains.kotlin.idea.base.util.projectScope
|
||||
import org.jetbrains.kotlin.idea.caches.project.implementingDescriptors
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyze
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.findModuleDescriptor
|
||||
@@ -61,8 +63,6 @@ import org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinReferencesSearchPar
|
||||
import org.jetbrains.kotlin.idea.search.isCheapEnoughToSearchConsideringOperators
|
||||
import org.jetbrains.kotlin.idea.search.usagesSearch.getClassNameForCompanionObject
|
||||
import org.jetbrains.kotlin.idea.search.usagesSearch.isDataClassProperty
|
||||
import org.jetbrains.kotlin.idea.base.projectStructure.scope.KotlinSourceFilterScope
|
||||
import org.jetbrains.kotlin.idea.base.util.projectScope
|
||||
import org.jetbrains.kotlin.idea.util.hasActualsFor
|
||||
import org.jetbrains.kotlin.js.resolve.diagnostics.findPsi
|
||||
import org.jetbrains.kotlin.lexer.KtTokens
|
||||
@@ -299,7 +299,7 @@ class UnusedSymbolInspection : AbstractKotlinInspection() {
|
||||
psiElement,
|
||||
null,
|
||||
message,
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
|
||||
true,
|
||||
*createQuickFixes(declaration).toTypedArray()
|
||||
)
|
||||
|
||||
+1
-4
@@ -1,9 +1,8 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.intentions
|
||||
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.ProblemHighlightType
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.psi.PsiElement
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
@@ -17,8 +16,6 @@ import org.jetbrains.kotlin.psi.psiUtil.getStrictParentOfType
|
||||
@Suppress("DEPRECATION")
|
||||
class RemoveEmptyClassBodyInspection : IntentionBasedInspection<KtClassBody>(RemoveEmptyClassBodyIntention::class),
|
||||
CleanupLocalInspectionTool {
|
||||
override fun problemHighlightType(element: KtClassBody): ProblemHighlightType = ProblemHighlightType.LIKE_UNUSED_SYMBOL
|
||||
|
||||
override fun inspectionProblemText(element: KtClassBody): String {
|
||||
return KotlinBundle.message("redundant.empty.class.body")
|
||||
}
|
||||
|
||||
+2
-5
@@ -1,9 +1,8 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.intentions
|
||||
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.ProblemHighlightType
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.util.TextRange
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
@@ -18,9 +17,7 @@ import org.jetbrains.kotlin.psi.psiUtil.getPrevSiblingIgnoringWhitespaceAndComme
|
||||
@Suppress("DEPRECATION")
|
||||
class RemoveEmptyParenthesesFromLambdaCallInspection : IntentionBasedInspection<KtValueArgumentList>(
|
||||
RemoveEmptyParenthesesFromLambdaCallIntention::class
|
||||
), CleanupLocalInspectionTool {
|
||||
override fun problemHighlightType(element: KtValueArgumentList): ProblemHighlightType = ProblemHighlightType.LIKE_UNUSED_SYMBOL
|
||||
}
|
||||
), CleanupLocalInspectionTool
|
||||
|
||||
class RemoveEmptyParenthesesFromLambdaCallIntention : SelfTargetingRangeIntention<KtValueArgumentList>(
|
||||
KtValueArgumentList::class.java, KotlinBundle.lazyMessage("remove.unnecessary.parentheses.from.function.call.with.lambda")
|
||||
|
||||
+2
-5
@@ -1,9 +1,8 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.intentions
|
||||
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.ProblemHighlightType
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.inspections.IntentionBasedInspection
|
||||
@@ -14,9 +13,7 @@ import org.jetbrains.kotlin.psi.psiUtil.containingClass
|
||||
@Suppress("DEPRECATION")
|
||||
class RemoveEmptyPrimaryConstructorInspection : IntentionBasedInspection<KtPrimaryConstructor>(
|
||||
RemoveEmptyPrimaryConstructorIntention::class
|
||||
), CleanupLocalInspectionTool {
|
||||
override fun problemHighlightType(element: KtPrimaryConstructor): ProblemHighlightType = ProblemHighlightType.LIKE_UNUSED_SYMBOL
|
||||
}
|
||||
), CleanupLocalInspectionTool
|
||||
|
||||
class RemoveEmptyPrimaryConstructorIntention : SelfTargetingOffsetIndependentIntention<KtPrimaryConstructor>(
|
||||
KtPrimaryConstructor::class.java,
|
||||
|
||||
+2
-5
@@ -1,9 +1,8 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.intentions
|
||||
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.ProblemHighlightType
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.inspections.IntentionBasedInspection
|
||||
@@ -13,9 +12,7 @@ import org.jetbrains.kotlin.psi.KtSecondaryConstructor
|
||||
@Suppress("DEPRECATION")
|
||||
class RemoveEmptySecondaryConstructorBodyInspection : IntentionBasedInspection<KtBlockExpression>(
|
||||
RemoveEmptySecondaryConstructorBodyIntention::class
|
||||
), CleanupLocalInspectionTool {
|
||||
override fun problemHighlightType(element: KtBlockExpression): ProblemHighlightType = ProblemHighlightType.LIKE_UNUSED_SYMBOL
|
||||
}
|
||||
), CleanupLocalInspectionTool
|
||||
|
||||
class RemoveEmptySecondaryConstructorBodyIntention : SelfTargetingOffsetIndependentIntention<KtBlockExpression>(
|
||||
KtBlockExpression::class.java,
|
||||
|
||||
+3
-6
@@ -1,14 +1,13 @@
|
||||
// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
|
||||
package org.jetbrains.kotlin.idea.intentions
|
||||
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.ProblemHighlightType
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.util.TextRange
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyzeAsReplacement
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyze
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyzeAsReplacement
|
||||
import org.jetbrains.kotlin.idea.inspections.IntentionBasedInspection
|
||||
import org.jetbrains.kotlin.psi.KtPsiFactory
|
||||
import org.jetbrains.kotlin.psi.KtQualifiedExpression
|
||||
@@ -24,9 +23,7 @@ import org.jetbrains.kotlin.types.error.ErrorUtils
|
||||
@Suppress("DEPRECATION")
|
||||
class RemoveExplicitSuperQualifierInspection : IntentionBasedInspection<KtSuperExpression>(
|
||||
RemoveExplicitSuperQualifierIntention::class
|
||||
), CleanupLocalInspectionTool {
|
||||
override fun problemHighlightType(element: KtSuperExpression): ProblemHighlightType = ProblemHighlightType.LIKE_UNUSED_SYMBOL
|
||||
}
|
||||
), CleanupLocalInspectionTool
|
||||
|
||||
class RemoveExplicitSuperQualifierIntention : SelfTargetingRangeIntention<KtSuperExpression>(
|
||||
KtSuperExpression::class.java,
|
||||
|
||||
-2
@@ -5,7 +5,6 @@ package org.jetbrains.kotlin.idea.intentions
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.LocalQuickFix
|
||||
import com.intellij.codeInspection.ProblemDescriptor
|
||||
import com.intellij.codeInspection.ProblemHighlightType
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.Key
|
||||
@@ -37,7 +36,6 @@ import org.jetbrains.kotlin.types.checker.KotlinTypeChecker
|
||||
@Suppress("DEPRECATION")
|
||||
class RemoveExplicitTypeArgumentsInspection : IntentionBasedInspection<KtTypeArgumentList>(RemoveExplicitTypeArgumentsIntention::class),
|
||||
CleanupLocalInspectionTool {
|
||||
override fun problemHighlightType(element: KtTypeArgumentList): ProblemHighlightType = ProblemHighlightType.LIKE_UNUSED_SYMBOL
|
||||
|
||||
override fun additionalFixes(element: KtTypeArgumentList): List<LocalQuickFix>? {
|
||||
val declaration = element.getStrictParentOfType<KtCallableDeclaration>() ?: return null
|
||||
|
||||
+1
-4
@@ -3,7 +3,6 @@
|
||||
package org.jetbrains.kotlin.idea.intentions
|
||||
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.ProblemHighlightType
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.util.TextRange
|
||||
import com.intellij.psi.search.searches.ReferencesSearch
|
||||
@@ -21,9 +20,7 @@ import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameUnsafe
|
||||
class RemoveForLoopIndicesInspection : IntentionBasedInspection<KtForExpression>(
|
||||
RemoveForLoopIndicesIntention::class,
|
||||
KotlinBundle.message("index.is.not.used.in.the.loop.body")
|
||||
), CleanupLocalInspectionTool {
|
||||
override fun problemHighlightType(element: KtForExpression): ProblemHighlightType = ProblemHighlightType.LIKE_UNUSED_SYMBOL
|
||||
}
|
||||
), CleanupLocalInspectionTool
|
||||
|
||||
class RemoveForLoopIndicesIntention : SelfTargetingRangeIntention<KtForExpression>(
|
||||
KtForExpression::class.java,
|
||||
|
||||
+1
-4
@@ -4,7 +4,6 @@ package org.jetbrains.kotlin.idea.intentions
|
||||
|
||||
import com.intellij.codeInsight.intention.FileModifier.SafeFieldForPreview
|
||||
import com.intellij.codeInspection.CleanupLocalInspectionTool
|
||||
import com.intellij.codeInspection.ProblemHighlightType
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.openapi.util.TextRange
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
@@ -22,9 +21,7 @@ import org.jetbrains.kotlin.types.isFlexible
|
||||
@Suppress("DEPRECATION")
|
||||
class RemoveRedundantCallsOfConversionMethodsInspection : IntentionBasedInspection<KtQualifiedExpression>(
|
||||
RemoveRedundantCallsOfConversionMethodsIntention::class
|
||||
), CleanupLocalInspectionTool {
|
||||
override fun problemHighlightType(element: KtQualifiedExpression) = ProblemHighlightType.LIKE_UNUSED_SYMBOL
|
||||
}
|
||||
), CleanupLocalInspectionTool
|
||||
|
||||
class RemoveRedundantCallsOfConversionMethodsIntention : SelfTargetingRangeIntention<KtQualifiedExpression>(
|
||||
KtQualifiedExpression::class.java,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// OUT_OF_CODE_BLOCK: FALSE
|
||||
// TYPE: '\b"a"'
|
||||
// INSPECTION-CLASS: org.jetbrains.kotlin.idea.inspections.RedundantInnerClassModifierInspection
|
||||
// INSPECTION: [LIKE_UNUSED_SYMBOL:6] Redundant 'inner' modifier
|
||||
// INSPECTION: [GENERIC_ERROR_OR_WARNING:6] Redundant 'inner' modifier
|
||||
class RedundantInner(private val s: String) {
|
||||
private inner class D {
|
||||
fun f(): Int {
|
||||
|
||||
@@ -1194,7 +1194,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.remove.explicit.type.arguments.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.intentions.RemoveExplicitSuperQualifierInspection"
|
||||
@@ -1203,7 +1203,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.remove.explicit.super.qualifier.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.SimplifyNegatedBinaryExpressionInspection"
|
||||
@@ -1268,7 +1268,7 @@
|
||||
level="WARNING"
|
||||
runForWholeFile="true"
|
||||
language="kotlin"
|
||||
suppressId="unused"
|
||||
suppressId="unused" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.unused.symbol.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.UnusedReceiverParameterInspection"
|
||||
@@ -1277,7 +1277,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.unused.receiver.parameter.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinUnusedImportInspection"
|
||||
@@ -1287,7 +1287,7 @@
|
||||
level="WARNING"
|
||||
runForWholeFile="true"
|
||||
language="kotlin"
|
||||
suppressId="UnusedImport"
|
||||
suppressId="UnusedImport" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.kotlin.unused.import.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.RedundantSamConstructorInspection"
|
||||
@@ -1349,7 +1349,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.remove.for.loop.indices.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.intentions.loopToCallChain.LoopToCallChainInspection"
|
||||
@@ -1389,7 +1389,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.redundant.visibility.modifier.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.intentions.DestructureInspection"
|
||||
@@ -1480,7 +1480,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.can.be.parameter.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.RedundantModalityModifierInspection"
|
||||
@@ -1489,7 +1489,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.redundant.modality.modifier.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.RedundantSemicolonInspection"
|
||||
@@ -1498,7 +1498,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.redundant.semicolon.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.RedundantUnitReturnTypeInspection"
|
||||
@@ -1507,7 +1507,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.redundant.unit.return.type.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.RedundantIfInspection"
|
||||
@@ -1566,7 +1566,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.remove.setter.parameter.type.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.conventionNameCalls.ReplaceCallWithBinaryOperatorInspection"
|
||||
@@ -1592,7 +1592,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.remove.to.string.in.string.template.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.intentions.RemoveEmptyParenthesesFromLambdaCallInspection"
|
||||
@@ -1601,7 +1601,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.remove.empty.parentheses.from.lambda.call.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.ReplaceArrayEqualityOpWithArraysEqualsInspection"
|
||||
@@ -1663,7 +1663,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.remove.empty.class.body.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.intentions.RemoveRedundantCallsOfConversionMethodsInspection"
|
||||
@@ -1672,7 +1672,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.remove.redundant.calls.of.conversion.methods.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.intentions.RemoveEmptyPrimaryConstructorInspection"
|
||||
@@ -1681,7 +1681,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.remove.empty.primary.constructor.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.intentions.RemoveEmptySecondaryConstructorBodyInspection"
|
||||
@@ -1690,7 +1690,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.remove.empty.secondary.constructor.body.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.intentions.JoinDeclarationAndAssignmentInspection"
|
||||
@@ -1869,7 +1869,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.remove.redundant.spread.operator.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.collections.UselessCallOnNotNullInspection"
|
||||
@@ -1886,7 +1886,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.redundant.explicit.type.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.collections.UselessCallOnCollectionInspection"
|
||||
@@ -1981,7 +1981,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.redundant.lambda.arrow.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.RedundantLambdaOrAnonymousFunctionInspection"
|
||||
@@ -2070,7 +2070,7 @@
|
||||
cleanupTool="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
suppressId="RedundantOverride"
|
||||
suppressId="RedundantOverride" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.kotlin.redundant.override.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinRedundantDiagnosticSuppressInspection"
|
||||
@@ -2112,7 +2112,7 @@
|
||||
groupBundle="messages.KotlinBundle" groupKey="group.names.redundant.constructs"
|
||||
enabledByDefault="true"
|
||||
level="WARNING"
|
||||
cleanupTool="true"
|
||||
cleanupTool="true" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
language="kotlin" key="inspection.remove.redundant.qualifier.name.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.RedundantSetterInspection"
|
||||
@@ -2138,7 +2138,7 @@
|
||||
groupBundle="messages.KotlinBundle" groupKey="group.names.redundant.constructs"
|
||||
enabledByDefault="true"
|
||||
level="INFORMATION"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.explicit.this.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
|
||||
@@ -2156,7 +2156,7 @@
|
||||
enabledByDefault="true"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
cleanupTool="true"
|
||||
cleanupTool="true" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.redundant.unit.expression.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.SelfAssignmentInspection"
|
||||
@@ -2234,7 +2234,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.redundant.suspend.modifier.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.SortModifiersInspection"
|
||||
@@ -2318,7 +2318,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.redundant.companion.reference.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.PublicApiImplicitTypeInspection"
|
||||
@@ -2572,7 +2572,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.redundant.with.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.collections.ConvertCallChainIntoSequenceInspection"
|
||||
@@ -2606,7 +2606,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.redundant.return.label.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.coroutines.DirectUseOfResultTypeInspection"
|
||||
@@ -2649,7 +2649,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.remove.empty.parentheses.from.annotation.entry.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.OptionalExpectationInspection"
|
||||
@@ -2689,7 +2689,7 @@
|
||||
groupBundle="messages.KotlinBundle" groupKey="group.names.style.issues"
|
||||
enabledByDefault="false"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.unused.main.parameter.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.DelegationToVarPropertyInspection"
|
||||
@@ -2771,7 +2771,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.redundant.enum.constructor.invocation.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.ReplaceRangeStartEndInclusiveWithFirstLastInspection"
|
||||
@@ -2883,7 +2883,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.redundant.empty.initializer.block.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinEqualsBetweenInconvertibleTypesInspection"
|
||||
@@ -2941,7 +2941,7 @@
|
||||
enabledByDefault="false"
|
||||
cleanupTool="true"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.redundant.inner.class.modifier.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.RedundantElvisReturnNullInspection"
|
||||
@@ -2950,7 +2950,7 @@
|
||||
enabledByDefault="true"
|
||||
cleanupTool="true"
|
||||
level="WARNING"
|
||||
language="kotlin"
|
||||
language="kotlin" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.redundant.elvis.return.null.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.logging.KotlinLoggerInitializedWithForeignClassInspection"
|
||||
@@ -3077,7 +3077,7 @@
|
||||
cleanupTool="true"
|
||||
level="WEAK WARNING"
|
||||
language="kotlin"
|
||||
runForWholeFile="true"
|
||||
runForWholeFile="true" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES"
|
||||
key="inspection.unnecessary.opt_in.annotation.display.name" bundle="messages.KotlinBundle"/>
|
||||
|
||||
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.KotlinJvmAnnotationInJavaInspection"
|
||||
|
||||
Reference in New Issue
Block a user