Rules which enforce generally accepted best practices.
Table of Contents
FunctionNameTooShort
Since: PMD 7.0.0
Priority: Medium (3)
Function names should be easy to understand and describe the intention. Makes developers happy.
This rule is defined by the following XPath expression:
//FunctionDeclaration/SimpleIdentifier/T-Identifier[string-length(@Text) < 3]
Example(s):
fun cl() {} // violation, no unavailable attribute added to the function declaration
fun calculateLayout() // no violation
Use this rule by referencing it:
<rule ref="category/kotlin/bestpractices.xml/FunctionNameTooShort" />