KT.MAX_CHAINED_CALLS_ON_SAME_LINE

Reached maximum chained calls on a single line.

Limits the number of chained calls which can be placed on a single line.

Noncompliant Code

Copy
a().b().c().d().e().f()

Compliant Code

Copy
a().b().c()
.d().e().f()

Options

  • maxChainedCalls (default: 5)

    maximum chained calls allowed on a single line

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