# structure/trivial-functions

> Finds functions with too few statements and files that only forward to other code.

Finds functions with too few statements and files that only forward to other code.

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

## Why

A function of one statement makes the reader jump for nothing.

## What to do

Inline a forwarding function at its calls and delete it. Split independent statements into the files that use them.

## Example

A Bash function that only calls another reports a finding. Inline the call at each caller, and delete the wrapper.

## Turn it off

Turn it off for some files, with a reason:

```shell
gspot ignore structure/trivial-functions --paths "<glob>" --reason "<why>"
```
