navigation

MaxLinesInValue (FL0024)

Cause

A statement binded to a value is made up of more than a configurable number of lines. For example the following would break the rule when the maximum number of lines is set to 4:

let value =
	let x = 7
	let y = 6
	let e = 5
	let r = 4
	r * y * e * x

Rationale

The larger a value becomes the more complex it becomes.

How To Fix

Refactor to extract out code into smaller composable functions.

Rule Settings

{
    "maxLinesInValue": {
        "enabled": false,
        "config": {
            "maxLines": 100
        }
    }
}