tailor
pants tailor [args]
Auto-generate BUILD file targets for new source files.
Each specific tailor
implementation may be disabled through language-specific options, e.g. [python].tailor_pex_binary_targets
and [shell-setup].tailor
.
Backend: pants.core
Config section: [tailor]
Basic options
False
Do not write changes to disk, only write back what would change. Return code 0 means there would be no changes, and 1 means that there would be.
Advanced options
BUILD
The name to use for generated BUILD files.
This must be compatible with [GLOBAL].build_patterns
.
None
A header, e.g., a copyright notice, to add to the content of created BUILD files.
The indent to use when auto-editing BUILD files.
{}
A mapping from standard target type to custom type to use instead. The custom type can be a custom target type or a macro that offers compatible functionality to the one it replaces (see Macros).
[]
Do not edit or create BUILD files at these paths.
Can use literal file names and/or globs, e.g. ['project/BUILD, 'ignore_me/**']
.
This augments the option [GLOBAL].build_ignore
, which tells Pants to also not read BUILD files at certain paths. In contrast, this option only tells Pants to not edit/create BUILD files at the specified paths.
ignore_adding_targets
ignore_adding_targets
--tailor-ignore-adding-targets="['<str>', '<str>', ...]"
PANTS_TAILOR_IGNORE_ADDING_TARGETS
[]
Do not add these target definitions.
Expects a list of target addresses that would normally be added by tailor
, e.g. ['project:tgt']
. To find these names, you can run tailor --check
, then combine the BUILD file path with the target's name. For example, if tailor
would add the target bin
to project/BUILD
, then the address would be project:bin
. If the BUILD file is at the root of your repository, use //
for the path, e.g. //:bin
.
Does not work with macros.
Deprecated options
None
Related subsystems
Updated about 1 month ago