Skip to content

Commit

Permalink
Set the name of functions and paramenters between ` to improve the re…
Browse files Browse the repository at this point in the history
…adability
  • Loading branch information
BraisGabin committed Jan 13, 2022
1 parent 27205a1 commit 1daca4c
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -153,7 +153,7 @@ private class UnusedFunctionVisitor(
else -> emptyList()
}
unusedFunctions.map {
CodeSmell(issue, Entity.from(it), "Private function $functionName is unused.")
CodeSmell(issue, Entity.from(it), "Private function `$functionName` is unused.")
}
}
}
Expand Down Expand Up @@ -212,7 +212,7 @@ private class UnusedParameterVisitor(allowedNames: Regex) : UnusedMemberVisitor(

override fun getUnusedReports(issue: Issue): List<CodeSmell> {
return unusedParameters.map {
CodeSmell(issue, Entity.from(it), "Function parameter ${it.nameAsSafeName.identifier} is unused.")
CodeSmell(issue, Entity.from(it), "Function parameter `${it.nameAsSafeName.identifier}` is unused.")
}
}

Expand Down Expand Up @@ -285,7 +285,7 @@ private class UnusedPropertyVisitor(allowedNames: Regex) : UnusedMemberVisitor(a
CodeSmell(
issue,
Entity.from(it),
"Private property ${it.nameAsSafeName.identifier} is unused."
"Private property `${it.nameAsSafeName.identifier}` is unused."
)
}
}
Expand Down

0 comments on commit 1daca4c

Please sign in to comment.