Skip to content

Commit

Permalink
fix: fix wording of some error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
outadoc committed Jun 24, 2022
1 parent 58a9576 commit f254d3f
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ abstract class ToothpickProcessor(
if (parentClass == null) {
logger.error(
this,
"@Inject-annotated property %s must be part of a class.",
"@Inject-annotated %s must be part of a class.",
qualifiedName?.asString()
)
return null
Expand All @@ -164,7 +164,7 @@ abstract class ToothpickProcessor(
if (parentClass.isPrivate()) {
logger.error(
this,
"Parent class of @Inject-annotated class %s must not be private.",
"Parent class of @Inject-annotated %s must not be private.",
qualifiedName?.asString()
)
return null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class MemberInjectorProcessor(
if (isPrivate()) {
logger.error(
this,
"@Inject-annotated property %s must not be private.",
"@Inject-annotated %s must not be private.",
qualifiedName?.asString()
)
return false
Expand All @@ -149,7 +149,7 @@ class MemberInjectorProcessor(
if (!isMutable || modifiers.contains(Modifier.FINAL)) {
logger.error(
this,
"@Inject-annotated property %s must be mutable.",
"@Inject-annotated %s must be mutable.",
qualifiedName?.asString()
)
return false
Expand All @@ -165,7 +165,7 @@ class MemberInjectorProcessor(
if (isPrivate()) {
logger.error(
this,
"@Inject-annotated method %s must not be private.",
"@Inject-annotated function %s must not be private.",
qualifiedName?.asString()
)
return false
Expand Down Expand Up @@ -197,7 +197,7 @@ class MemberInjectorProcessor(
if (!hasWarningSuppressed(SUPPRESS_WARNING_ANNOTATION_VISIBLE_VALUE)) {
logger.crashOrWarnWhenMethodIsNotPackageOrInternal(
this,
"@Inject-annotated method %s should have package or internal visibility.",
"@Inject-annotated function %s should have package or internal visibility.",
qualifiedName?.asString()
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,7 @@ class FieldMemberInjectorTest {
.processedWith(MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"@Inject-annotated property test.TestFieldInjection.foo must not be private."
"@Inject-annotated test.TestFieldInjection.foo must not be private."
)
}

Expand All @@ -941,7 +941,7 @@ class FieldMemberInjectorTest {
.processedWith(MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"@Inject-annotated property test.TestFieldInjection.foo must not be private."
"@Inject-annotated test.TestFieldInjection.foo must not be private."
)
}

Expand All @@ -965,7 +965,7 @@ class FieldMemberInjectorTest {
.processedWith(MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"@Inject-annotated property test.TestFieldInjection.foo must be mutable."
"@Inject-annotated test.TestFieldInjection.foo must be mutable."
)
}

Expand All @@ -988,7 +988,7 @@ class FieldMemberInjectorTest {
.processedWith(MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"@Inject-annotated property test.TestFieldInjection.foo must be mutable."
"@Inject-annotated test.TestFieldInjection.foo must be mutable."
)
}

Expand All @@ -1014,7 +1014,7 @@ class FieldMemberInjectorTest {
.processedWith(MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"Parent class of @Inject-annotated class test.TestFieldInjection.InnerClass.foo must not be private."
"Parent class of @Inject-annotated test.TestFieldInjection.InnerClass.foo must not be private."
)
}

Expand All @@ -1039,7 +1039,7 @@ class FieldMemberInjectorTest {
.processedWith(MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"Parent class of @Inject-annotated class test.TestFieldInjection.InnerClass.foo must not be private."
"Parent class of @Inject-annotated test.TestFieldInjection.InnerClass.foo must not be private."
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ class MethodMemberInjectorTest {
.processedWith(MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"@Inject-annotated method test.TestMethodInjection.m must not be private."
"@Inject-annotated function test.TestMethodInjection.m must not be private."
)
}

Expand All @@ -434,7 +434,7 @@ class MethodMemberInjectorTest {
.processedWith(MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"@Inject-annotated method test.TestMethodInjection.m must not be private."
"@Inject-annotated function test.TestMethodInjection.m must not be private."
)
}

Expand All @@ -460,7 +460,7 @@ class MethodMemberInjectorTest {
.processedWith(MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"Parent class of @Inject-annotated class test.TestMethodInjection.InnerClass.m must not be private."
"Parent class of @Inject-annotated test.TestMethodInjection.InnerClass.m must not be private."
)
}

Expand All @@ -486,7 +486,7 @@ class MethodMemberInjectorTest {
.processedWith(MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"Parent class of @Inject-annotated class test.TestMethodInjection.InnerClass.m must not be private."
"Parent class of @Inject-annotated test.TestMethodInjection.InnerClass.m must not be private."
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class RelaxedFactoryForClassContainingFieldsTest {
.processedWith(FactoryProcessorProvider(), MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"@Inject-annotated property test.TestRelaxedFactoryCreationForInjectField.foo must not be private."
"@Inject-annotated test.TestRelaxedFactoryCreationForInjectField.foo must not be private."
)
}

Expand All @@ -152,7 +152,7 @@ class RelaxedFactoryForClassContainingFieldsTest {
.processedWith(FactoryProcessorProvider(), MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"@Inject-annotated property test.TestRelaxedFactoryCreationForInjectField.foo must not be private."
"@Inject-annotated test.TestRelaxedFactoryCreationForInjectField.foo must not be private."
)
}

Expand All @@ -177,7 +177,7 @@ class RelaxedFactoryForClassContainingFieldsTest {
.processedWith(FactoryProcessorProvider(), MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"Parent class of @Inject-annotated class test.TestRelaxedFactoryCreationForInjectField.InnerClass.foo must not be private."
"Parent class of @Inject-annotated test.TestRelaxedFactoryCreationForInjectField.InnerClass.foo must not be private."
)
}

Expand All @@ -202,7 +202,7 @@ class RelaxedFactoryForClassContainingFieldsTest {
.processedWith(FactoryProcessorProvider(), MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"TestRelaxedFactoryCreationForInjectField.kt:5: Parent class of @Inject-annotated class test.TestRelaxedFactoryCreationForInjectField.InnerClass.foo must not be private."
"TestRelaxedFactoryCreationForInjectField.kt:5: Parent class of @Inject-annotated test.TestRelaxedFactoryCreationForInjectField.InnerClass.foo must not be private."
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class RelaxedFactoryForClassContainingMethodsTest {
.processedWith(FactoryProcessorProvider(), MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"@Inject-annotated method test.TestRelaxedFactoryCreationForInjectMethod.m must not be private."
"@Inject-annotated function test.TestRelaxedFactoryCreationForInjectMethod.m must not be private."
)
}

Expand All @@ -152,7 +152,7 @@ class RelaxedFactoryForClassContainingMethodsTest {
.processedWith(FactoryProcessorProvider(), MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"@Inject-annotated method test.TestRelaxedFactoryCreationForInjectMethod.m must not be private."
"@Inject-annotated function test.TestRelaxedFactoryCreationForInjectMethod.m must not be private."
)
}

Expand All @@ -177,7 +177,7 @@ class RelaxedFactoryForClassContainingMethodsTest {
.processedWith(FactoryProcessorProvider(), MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"Parent class of @Inject-annotated class test.TestRelaxedFactoryCreationForInjectMethod.InnerClass.m must not be private."
"Parent class of @Inject-annotated test.TestRelaxedFactoryCreationForInjectMethod.InnerClass.m must not be private."
)
}

Expand All @@ -202,7 +202,7 @@ class RelaxedFactoryForClassContainingMethodsTest {
.processedWith(FactoryProcessorProvider(), MemberInjectorProcessorProvider())
.failsToCompile()
.withLogContaining(
"Parent class of @Inject-annotated class test.TestRelaxedFactoryCreationForInjectMethod.InnerClass.m must not be private."
"Parent class of @Inject-annotated test.TestRelaxedFactoryCreationForInjectMethod.InnerClass.m must not be private."
)
}

Expand Down

0 comments on commit f254d3f

Please sign in to comment.