RedundantLetInspection: fix descriptions

This commit is contained in:
Dmitry Gridin
2019-06-25 15:10:17 +07:00
parent 7e0db3d612
commit 2ef2c358c4
4 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -2234,7 +2234,7 @@
/> />
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.SimpleRedundantLetInspection" <localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.SimpleRedundantLetInspection"
displayName="Redundant `let` call" displayName="Redundant receiver-based `let` call"
groupPath="Kotlin" groupPath="Kotlin"
groupName="Redundant constructs" groupName="Redundant constructs"
enabledByDefault="true" enabledByDefault="true"
@@ -2243,7 +2243,7 @@
/> />
<localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.ComplexRedundantLetInspection" <localInspection implementationClass="org.jetbrains.kotlin.idea.inspections.ComplexRedundantLetInspection"
displayName="Redundant `let` call could be removed" displayName="Redundant argument-based `let` call"
groupPath="Kotlin" groupPath="Kotlin"
groupName="Redundant constructs" groupName="Redundant constructs"
enabledByDefault="true" enabledByDefault="true"
@@ -1,5 +1,5 @@
<html> <html>
<body> <body>
This inspection detects a redundant <b>let</b> when it includes only one call with lambda parameter. This inspection detects a redundant argument-based <b>let</b> call.
</body> </body>
</html> </html>
@@ -1,5 +1,5 @@
<html> <html>
<body> <body>
This inspection detects a redundant <b>let</b> when it includes only one call with lambda parameter as receiver. This inspection detects a redundant receiver-based <b>let</b> call.
</body> </body>
</html> </html>
@@ -41,7 +41,7 @@ abstract class RedundantLetInspection : AbstractApplicabilityBasedInspection<KtC
val lambdaExpression = element.lambdaArguments.firstOrNull()?.getLambdaExpression() ?: return false val lambdaExpression = element.lambdaArguments.firstOrNull()?.getLambdaExpression() ?: return false
val parameterName = lambdaExpression.getParameterName() ?: return false val parameterName = lambdaExpression.getParameterName() ?: return false
return myIsApplicable( return isApplicable(
element, element,
lambdaExpression.bodyExpression?.children?.singleOrNull() ?: return false, lambdaExpression.bodyExpression?.children?.singleOrNull() ?: return false,
lambdaExpression, lambdaExpression,
@@ -49,7 +49,7 @@ abstract class RedundantLetInspection : AbstractApplicabilityBasedInspection<KtC
) )
} }
protected abstract fun myIsApplicable( protected abstract fun isApplicable(
element: KtCallExpression, element: KtCallExpression,
bodyExpression: PsiElement, bodyExpression: PsiElement,
lambdaExpression: KtLambdaExpression, lambdaExpression: KtLambdaExpression,
@@ -67,7 +67,7 @@ abstract class RedundantLetInspection : AbstractApplicabilityBasedInspection<KtC
} }
class SimpleRedundantLetInspection : RedundantLetInspection() { class SimpleRedundantLetInspection : RedundantLetInspection() {
override fun myIsApplicable( override fun isApplicable(
element: KtCallExpression, element: KtCallExpression,
bodyExpression: PsiElement, bodyExpression: PsiElement,
lambdaExpression: KtLambdaExpression, lambdaExpression: KtLambdaExpression,
@@ -76,7 +76,7 @@ class SimpleRedundantLetInspection : RedundantLetInspection() {
} }
class ComplexRedundantLetInspection : RedundantLetInspection() { class ComplexRedundantLetInspection : RedundantLetInspection() {
override fun myIsApplicable( override fun isApplicable(
element: KtCallExpression, element: KtCallExpression,
bodyExpression: PsiElement, bodyExpression: PsiElement,
lambdaExpression: KtLambdaExpression, lambdaExpression: KtLambdaExpression,