Open mxalbert1996 opened 7 months ago
I am not sure about splitting the rule. An alternative could be to add a configuration parameter to the rule that defines the format to be used for constants. This configuration parameter should then allow values SCREAMING_CASE
(default) and PASCAL_CASE
.
Hi, is this something that is still being considered?
Yes, otherwise I would have closed it. But TBH, it is not high on my list of things to do.
Expected Rule behavior
Ktlint reports PascalCase constant names as violations, in compliance with Kotlin/Android style guide. If we want to use PascalCase for constants, we need to disable the rule, but the linting of other non-constant properties is also disabled. It would be great if the naming rule for constants can be separated so that we can disable that rule only.
Since PascalCase is recommended by Baseline style guidelines of Jetpack Compose, I think this is a rather common need.
Additional information