Boolean Prefix (ARCH8007)
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Key kotlin.naming.boolean-prefix · Severity info · Category naming
Flags Boolean properties and functions whose name lacks an interrogative prefix (is/has/can/should).
Incorrect
Section titled “Incorrect”val active: Boolean = truefun premium(): Boolean = falseCorrect
Section titled “Correct”val isActive: Boolean = truefun hasPremium(): Boolean = falsePrefix Boolean members with is/has/can/should so conditions read as questions.