# xcode/files-without-target

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

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

Part of the [`xcode`](/reference/configurations/xcode/) 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

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

## What to do

Add the file to a target, or delete it.

## Example

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

## Turn it off

Turn it off for some files, with a reason:

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