Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Enforce enum names #635

Closed
gotev opened this issue Nov 4, 2019 · 3 comments · Fixed by #638
Closed

Enforce enum names #635

gotev opened this issue Nov 4, 2019 · 3 comments · Fixed by #638
Labels

Comments

@gotev
Copy link

gotev commented Nov 4, 2019

Hi and thanks for this awesome tool!

I haven't found how to enforce enum names though (e.g. I'd like all the enum names to be camel case with the first uppercase letter). I wonder if I've missed something or simply it's not implemented yet.

From: https://kotlinlang.org/docs/reference/coding-conventions.html#property-names

For enum constants, it's OK to use either uppercase underscore-separated names (enum class Color { RED, GREEN }) or regular camel-case names starting with an uppercase first letter, depending on the usage.

Thanks in advance!

@ataulm
Copy link

ataulm commented Oct 16, 2024

@yukukotani I noticed that the implemented rule follows the coding conventions, allowing either of the two options (screaming snake, upper camel); out of interest, would it be possible to configure it to choose one of the two as allowed (within a project) for consistency?

@yukukotani
Copy link
Contributor

@ataulm Sounds good for me but I'm not the right person to decide it since I'm not a maintainer.

@ataulm
Copy link

ataulm commented Oct 16, 2024

Thanks @yukukotani, raised an issue here :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants