Also, why doesn’t detekt like my constant names? ...
# detekt
e
Also, why doesn’t detekt like my constant names? According to the style guide (https://kotlinlang.org/docs/reference/coding-conventions.html#naming-rules) constant property names should be UPPER_SNAKE_CASE.
I got an answer from my teammates: I should put this in a companion object. (Never mind that that’s the opposite of what another teammate told me a few weeks ago.)
a
They are not “real” constants as they are initialized on instantiating the class.
I’d move them outside the class and set them as
private const val
👍 1
b
I agree with Alejando. Move them outside the class is even better than create a
companion object
1