Skip to content

Commit

Permalink
Merge pull request #162 from FCatinella/fix-package-names-that-start-…
Browse files Browse the repository at this point in the history
…with-it

fix: Removed "it" from forbiddenKeywords and replace "" with "_ -> " …
  • Loading branch information
arnaudgiuliani authored Oct 15, 2024
2 parents 67b451c + 7bf55d5 commit f60f14c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class DefinitionWriter(
}

private fun List<KoinMetaData.DefinitionParameter>.generateParamFunction(): String {
return if (any { it is KoinMetaData.DefinitionParameter.ParameterInject }) "params -> " else ""
return if (any { it is KoinMetaData.DefinitionParameter.ParameterInject }) "params -> " else "_ -> "
}

private fun String?.generateQualifier(): String = when {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ internal fun List<KSValueArgument>.getValueArgument(): String? {

fun KSClassDeclaration.getPackageName() : String = packageName.asString()

val forbiddenKeywords = listOf("in","interface","it")
val forbiddenKeywords = listOf("in","interface")
fun String.filterForbiddenKeywords() : String{
return split(".").joinToString(".") {
if (it in forbiddenKeywords) "`$it`" else it
Expand Down

0 comments on commit f60f14c

Please sign in to comment.