Open aiovlev opened 3 years ago
We use the following pattern to detect lower camel case: [a-z]([a-z0-9])*([A-Z][a-z0-9]+)*
fun String.isLowerCamelCase(): Boolean = this.matches("[a-z]([a-z0-9])*([A-Z][a-z0-9]+)*".toRegex())
Probably, the regex can be updated to [a-z]([a-z0-9])*([A-Z][a-z0-9]+)*[A-Z]?
. But need to test StringCaseUtils
Describe the bug
Variable names ending with a capital letter are considered errors.
Expected behavior
no warnings/errors
Observed behavior
Steps to Reproduce
Create a variable ending with a capital letter (for example
topK
) and runmvn diktat:check
Environment information