function-max-lines

July 4, 2025 ยท View on GitHub

Recommended Badge Category Badge Default Severity Badge warn

The {"extends": "solhint:recommended"} property in a configuration file enables this rule.

Description

Function body contains "count" lines but allowed no more than maxlines.

Options

This rule accepts an array of options:

IndexDescriptionDefault Value
0Rule severity. Must be one of "error", "warn", "off".warn
1Maximum allowed lines count per function50

Example Config

{
  "rules": {
    "function-max-lines": [
      "warn",
      50
    ]
  }
}

Examples

This rule does not have examples.

Version

This rule was introduced in Solhint 5.0.4

Resources