# swift/periphery

> Scans the built project for declarations nothing uses.

Scans the built project for declarations nothing uses.

Part of the [`swift`](/reference/configurations/swift/) configuration, at the `recommended` [level](/start/concepts/#levels). It runs at the `push` [stage](/start/concepts/#stage), once per scope. It runs periphery. It needs a build of the project.

## Why

People read, maintain, and migrate dead code without knowing that nothing uses it.

## What to do

Delete the declaration, or mark it with a periphery:ignore comment that says who uses it.

## Example

A declaration that nothing references reports unused code. Delete it, and rebuild.

## Turn it off

Turn it off for some files, with a reason:

```shell
gspot ignore swift/periphery --paths "<glob>" --reason "<why>"
```

To silence one place, write a comment such as:

```text
// periphery:ignore - the runtime calls it by name
```
