This rule detects multi-line if statements which do not have braces. Adding braces would improve readability and avoid possible errors.
val i = 1if (i > 0) println(i)
val x = if (condition) 5 else 4
The content on this page is adapted from the Detekt Docs. Copyright ©2022 The Detekt Team. All rights reserved. https://detekt.dev/comments.html