Zum Inhalt springen

Deep Nesting (ARCH8184)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Key kotlin.quality.deep-nesting · Severity warning · Category quality

Flags control flow nested deeper than three levels.

if (a) { if (b) { for (x in xs) { if (x.ok) { doIt() } } } }
if (!a || !b) return
xs.filter { it.ok }.forEach { doIt() }

Use early returns, extract functions, or collection operations.