swift/periphery
Scans the built project for declarations nothing uses.
Part of the swift configuration, at the recommended level. It runs at the push stage, once per scope. It runs periphery. It needs a build of the project.
People read, maintain, and migrate dead code without knowing that nothing uses it.
What to do
Section titled “What to do”Delete the declaration, or mark it with a periphery:ignore comment that says who uses it.
Example
Section titled “Example”A declaration that nothing references reports unused code. Delete it, and rebuild.
Turn it off
Section titled “Turn it off”Turn it off for some files, with a reason:
gspot ignore swift/periphery --paths "<glob>" --reason "<why>"To silence one place, write a comment such as:
// periphery:ignore - the runtime calls it by name