HomeDocs
DocsCommunityTestimonialsUsersGitHubTwitterBlogJobsTermsPrivacyCookies
TermsPrivacyCookies
Hey! These docs are for version 2.10, 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 a longer timeout on a test.

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 or Yapf

`./pants run update-build-files` will format your BUILD files, using the [Black Python formatter](🔗) by default. 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](🔗).



You can instead use [Yapf](🔗) by setting `[update-build-files].formatter = "yapf"` in `pants.toml`.