Skip to content

bash/function-size

Checks every shell function against the size ceilings: code lines, branches, nesting, and assignments.

Part of the bash configuration, at the all level. It runs at the commit stage, per file. gspot runs this check itself.

A long script holds more than one job, and many branches or assignments hide several functions under one name.

Split the script or the function, or raise the named limits.bash setting with a reason.

A function over limits.bash.function_lines reports function-lines with the count and the limit. Split it by job.

Turn it off for some files, with a reason:

gspot ignore bash/function-size --paths "<glob>" --reason "<why>"