Ir al contenido

Named Boolean Argument (ARCH8185)

Esta página aún no está disponible en tu idioma.

Key kotlin.quality.named-boolean-argument · Severity info · Category quality

Flags true / false literals passed positionally to calls with two or more arguments - the reader cannot tell what the flag means. Only where a name can be added: Kotlin does not allow named arguments for functions declared in Java.

render(user, true, false)
render(user, compact = true, showAvatar = false)

Use named arguments for boolean flags, or an enum.