Why this matters
Prevents leaks and dangling tasks, enabling graceful shutdowns.
Ensure close/stop/dispose is called for resources (clients, channels, scopes) using use{} or try/finally; cancel coroutines on shutdown.
Prevents leaks and dangling tasks, enabling graceful shutdowns.
Side-by-side examples engineers can pattern-match during review.
val channel = Channel<Int>() // never closedval job = scope.launch { /* work */ }
try { /* use */ } finally { job.cancel(); channel.close() }HttpClient() // no closeclient.use { /* requests */ }From the same buckets as this rule.