# bash/function-size

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

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

Part of the [`bash`](/reference/configurations/bash/) configuration, at the `all` [level](/start/concepts/#levels). It runs at the `commit` [stage](/start/concepts/#stage), per file. gspot runs this check itself.

## Why

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

## What to do

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

## Example

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

## Turn it off

Turn it off for some files, with a reason:

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