Hey! These docs are for version 2.8, which is no longer officially supported. Click here for the latest version, 2.15!

Many Pants operations require extra metadata in the form of [_targets_](🔗), which are defined in `BUILD` files.

You can generate these BUILD files by running `./pants tailor`:

Often, this will be all you need for Pants to work, thanks to sensible defaults and inference, like [inferring your dependencies](🔗). Sometimes, though, you may need to or want to change certain fields, like setting `timeout=120` on a `python_test` target.

You may also need to add some targets that Pants cannot generate, like [`resources` and `files`](🔗) targets.

We recommend running `./pants tailor --check` in your [continuous integration](🔗) so that you don't forget to add any targets and BUILD files.

To ignore false positives, set `[tailor].ignore_paths` and `[tailor].ignore_adding_targets`. See [tailor](🔗) for more detail.

## Formatting BUILD files with Black

`./pants run update-build-files` will format your BUILD files with the Black Python formatter. The goal will also fix any safe Pants deprecations like renaming target types.

Like `tailor`, we recommend running `./pants update-build-files --check` in your [continuous integration](🔗).