navigation

MaxLinesInLambdaFunction (FL0022)

Cause

A lambda function is made up of more than a configurable number of lines.

Rationale

Lambda functions are usually used for single lines of code that aren't worth naming to make code more concise. A large lambda function indicates it should probably be a named function.

How To Fix

Consider using a named function rather than a lambda function.

Rule Settings

{
    "maxLinesInLambdaFunction": {
        "enabled": false,
        "config": {
            "maxLines": 7
        }
    }
}