A lambda has more lines of code than the configured maximum

tx0/kotlin:long-lambdaallwarningmaintainability/complexitydepth fastmaintainability

What it finds

A long lambda is a function without a name: it cannot be read, tested or reused on its own. Lines of code are lines on which a token starts. The maximum is the parameter max, 40 by default. Lambdas that are the body of a builder used as a whole file, such as a Gradle script block, are counted too.

From the rule's source, long_lambda.rs.

Turn it on, off or suppress it

The rule runs from the all tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/kotlin:long-lambda" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

// tx0: ignore[tx0/kotlin:long-lambda] reason="..."

tx0 explain tx0/kotlin:long-lambda shows the same in the terminal. Found a false positive? Report it.