diff --git a/idea/src/META-INF/plugin.xml b/idea/src/META-INF/plugin.xml index ed583973293..775d0fb9b93 100644 --- a/idea/src/META-INF/plugin.xml +++ b/idea/src/META-INF/plugin.xml @@ -2305,7 +2305,7 @@ /> parentIfOrWhile.condition else -> null } - val highlightType = - if (condition != null && condition in expression.parentsWithSelf) GENERIC_ERROR_OR_WARNING else INFORMATION + val (highlightType, verb) = if (condition != null && condition in expression.parentsWithSelf) + GENERIC_ERROR_OR_WARNING to "should" + else + INFORMATION to "can" holder.registerProblem(expression, - "Equality check can be used instead of elvis", + "Equality check $verb be used instead of elvis for nullable boolean check", highlightType, ReplaceWithEqualityCheckFix()) } diff --git a/idea/testData/inspections/nullableBooleanElvis/inspectionData/expected.xml b/idea/testData/inspections/nullableBooleanElvis/inspectionData/expected.xml index ed949048701..a02ffb07bb0 100644 --- a/idea/testData/inspections/nullableBooleanElvis/inspectionData/expected.xml +++ b/idea/testData/inspections/nullableBooleanElvis/inspectionData/expected.xml @@ -4,48 +4,48 @@ 4 light_idea_test_case - Equality check can be used instead of elvis - Equality check can be used instead of elvis + Equality check can be used instead of elvis for nullable boolean check + Equality check should be used instead of elvis for nullable boolean check test.kt 7 light_idea_test_case - Equality check can be used instead of elvis - Equality check can be used instead of elvis + Equality check can be used instead of elvis for nullable boolean check + Equality check should be used instead of elvis for nullable boolean check test.kt 10 light_idea_test_case - Equality check can be used instead of elvis - Equality check can be used instead of elvis + Equality check can be used instead of elvis for nullable boolean check + Equality check should be used instead of elvis for nullable boolean check test.kt 10 light_idea_test_case - Equality check can be used instead of elvis - Equality check can be used instead of elvis + Equality check can be used instead of elvis for nullable boolean check + Equality check should be used instead of elvis for nullable boolean check test.kt 13 light_idea_test_case - Equality check can be used instead of elvis - Equality check can be used instead of elvis + Equality check can be used instead of elvis for nullable boolean check + Equality check can be used instead of elvis for nullable boolean check test.kt 14 light_idea_test_case - Equality check can be used instead of elvis - Equality check can be used instead of elvis + Equality check can be used instead of elvis for nullable boolean check + Equality check can be used instead of elvis for nullable boolean check \ No newline at end of file