navigation

MaxLinesInConstructor (FL0027)

Cause

A class constructor is made up of more than a configurable number of lines.

Rationale

The larger a constructor becomes the more complex it becomes, it also indicates that it may have too many different responsibilities.

How To Fix

Extract code out into private methods or functions.

Rule Settings

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