KT.NON_BOOLEAN_PROPERTY_PREFIXED_WITH_IS

Property with 'is' prefix doesn't have a boolean type

Reports when property with 'is' prefix doesn't have a boolean type.

Noncompliant Code

Copy
val isEnabled: Int = 500

Compliant Code

Copy
val isEnabled: Boolean = false

The content on this page is adapted from the Detekt Docs. Copyright ©2022 The Detekt Team. All rights reserved. https://detekt.dev/comments.html