Skip to content

xcode/files-without-target

Finds the Swift files in the tree that no target of the project names.

Part of the xcode configuration, at the recommended level. It runs at the commit stage, once per scope. gspot runs this check itself.

Xcode never compiles a Swift file that belongs to no target, so it breaks unnoticed.

Add the file to a target, or delete it.

A Swift file in no target reports a finding. Add the file to a target, or delete it.

Turn it off for some files, with a reason:

gspot ignore xcode/files-without-target --paths "<glob>" --reason "<why>"