# bash/unused-functions

> Finds shell functions no script in the scope calls.

Finds shell functions no script in the scope calls.

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

## Why

A function that nothing calls still costs reading and upkeep, and it hides which code runs.

## What to do

Delete the function. For a required hook entry point, run `gspot ignore bash/unused-functions --paths <file> --reason <why>`.

## Example

A private function `_orphan` that no script calls reports a finding. Delete it, or record a hook that needs it with `gspot ignore` and a reason.

## Turn it off

Turn it off for some files, with a reason:

```shell
gspot ignore bash/unused-functions --paths "<glob>" --reason "<why>"
```
