Remove setter parameter type: reformat
This commit is contained in:
+6
-4
@@ -17,10 +17,12 @@ class RemoveSetterParameterTypeInspection : AbstractKotlinInspection() {
|
||||
override fun buildVisitor(holder: ProblemsHolder, isOnTheFly: Boolean): PsiElementVisitor {
|
||||
return parameterVisitor { dcl ->
|
||||
val typeReference = dcl.takeIf { it.isSetterParameter }?.typeReference ?: return@parameterVisitor
|
||||
holder.registerProblem(typeReference,
|
||||
"Redundant setter parameter type",
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
IntentionWrapper(RemoveExplicitTypeIntention(), dcl.containingKtFile))
|
||||
holder.registerProblem(
|
||||
typeReference,
|
||||
"Redundant setter parameter type",
|
||||
ProblemHighlightType.LIKE_UNUSED_SYMBOL,
|
||||
IntentionWrapper(RemoveExplicitTypeIntention(), dcl.containingKtFile)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user