From a8737a1278ea277f25216f47bd707dd15defdbb3 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Wed, 6 Jun 2018 15:33:21 +0300 Subject: [PATCH] Can be private -> could be private (violation of naming convention) --- .../MemberVisibilityCanBePrivateInspection.kt | 2 +- .../inspectionData/expected.xml | 28 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/MemberVisibilityCanBePrivateInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/MemberVisibilityCanBePrivateInspection.kt index e149617221d..a0d10fee0a5 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/MemberVisibilityCanBePrivateInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/MemberVisibilityCanBePrivateInspection.kt @@ -153,7 +153,7 @@ class MemberVisibilityCanBePrivateInspection : AbstractKotlinInspection() { val nameElement = (declaration as? PsiNameIdentifierOwner)?.nameIdentifier ?: return holder.registerProblem( declaration.visibilityModifier() ?: nameElement, - "$member '${declaration.getName()}' can be private", + "$member '${declaration.getName()}' could be private", ProblemHighlightType.GENERIC_ERROR_OR_WARNING, IntentionWrapper(AddModifierFix(modifierListOwner, KtTokens.PRIVATE_KEYWORD), declaration.containingKtFile) ) diff --git a/idea/testData/inspections/memberVisibilityCanBePrivate/inspectionData/expected.xml b/idea/testData/inspections/memberVisibilityCanBePrivate/inspectionData/expected.xml index 09a5cc3257c..9a82c2b8e5b 100644 --- a/idea/testData/inspections/memberVisibilityCanBePrivate/inspectionData/expected.xml +++ b/idea/testData/inspections/memberVisibilityCanBePrivate/inspectionData/expected.xml @@ -5,7 +5,7 @@ light_idea_test_case Can have 'private' visibility - Property 'a' can be private + Property 'a' could be private @@ -15,7 +15,7 @@ light_idea_test_case Can have 'private' visibility - Function 'f1' can be private + Function 'f1' could be private @@ -24,7 +24,7 @@ light_idea_test_case Can have 'private' visibility - Function 'f2' can be private + Function 'f2' could be private @@ -33,7 +33,7 @@ light_idea_test_case Can have 'private' visibility - Property 'y' can be private + Property 'y' could be private @@ -42,7 +42,7 @@ light_idea_test_case Can have 'private' visibility - Function 'f2' can be private + Function 'f2' could be private @@ -51,7 +51,7 @@ light_idea_test_case Can have 'private' visibility - Property 'a' can be private + Property 'a' could be private @@ -60,7 +60,7 @@ light_idea_test_case Can have 'private' visibility - Property 'b' can be private + Property 'b' could be private @@ -69,7 +69,7 @@ light_idea_test_case Can have 'private' visibility - Property 'c' can be private + Property 'c' could be private @@ -78,7 +78,7 @@ light_idea_test_case Can have 'private' visibility - Property 'bar' can be private + Property 'bar' could be private @@ -87,7 +87,7 @@ light_idea_test_case Class member can have 'private' visibility - Property 'a' can be private + Property 'a' could be private @@ -96,7 +96,7 @@ light_idea_test_case Class member can have 'private' visibility - Property 'b' can be private + Property 'b' could be private @@ -105,7 +105,7 @@ light_idea_test_case Class member can have 'private' visibility - Function 'c' can be private + Function 'c' could be private @@ -114,7 +114,7 @@ light_idea_test_case Class member can have 'private' visibility - Property 'b' can be private + Property 'b' could be private @@ -123,6 +123,6 @@ light_idea_test_case Class member can have 'private' visibility - Function 'c' can be private + Function 'c' could be private