Is it okay, that Detekt flags this kind of code, w...
# detekt
p
Is it okay, that Detekt flags this kind of code, with failed
MatchingDeclarationName
? 🤔
Copy code
// file name Banana.kt
enum Color {
    A,
    B
}

fun Banana(onClick: (Color) -> Unit) = TODO("")
s
Yes, as that rule applies to an object, class, enum or interface, but not to a function.
You should be able to move the enum class to below the function to work around that.