Minor fixes: can be constructor property

(cherry picked from commit 4d44e15)
This commit is contained in:
Mikhail Glukhikh
2016-06-17 16:41:15 +03:00
committed by Mikhail Glukhikh
parent 8d2389d15c
commit 4145e3438f
3 changed files with 4 additions and 4 deletions
@@ -1,5 +1,5 @@
<html>
<body>
This inspection reports properties which are explicitly assigned by constructor arguments and can be declared directly in constructor instead.
This inspection reports properties which are explicitly assigned to constructor parameters and can be declared directly in constructor instead.
</body>
</html>
@@ -58,7 +58,7 @@ class CanBePrimaryConstructorPropertyInspection : AbstractKotlinInspection() {
holder.registerProblem(holder.manager.createProblemDescriptor(
nameIdentifier,
nameIdentifier,
"Property is explicitly assigned by parameter ${assignedDescriptor.name}, can be declared directly in constructor",
"Property is explicitly assigned to parameter ${assignedDescriptor.name}, can be declared directly in constructor",
ProblemHighlightType.GENERIC_ERROR_OR_WARNING,
isOnTheFly,
MakeConstructorPropertyFix(property, assignedParameter)
@@ -5,7 +5,7 @@
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/properties.kt" />
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Property is explicitly assigned to constructor parameter</problem_class>
<description>Property is explicitly assigned by parameter simple, can be declared directly in constructor</description>
<description>Property is explicitly assigned to parameter simple, can be declared directly in constructor</description>
</problem>
<problem>
<file>properties.kt</file>
@@ -13,6 +13,6 @@
<module>light_idea_test_case</module>
<entry_point TYPE="file" FQNAME="temp:///src/properties.kt" />
<problem_class severity="WARNING" attribute_key="WARNING_ATTRIBUTES">Property is explicitly assigned to constructor parameter</problem_class>
<description>Property is explicitly assigned by parameter withType, can be declared directly in constructor</description>
<description>Property is explicitly assigned to parameter withType, can be declared directly in constructor</description>
</problem>
</problems>