buildifier
Buildifier is a tool for formatting BUILD files with a standard convention.
Pants supports running Buildifier on your Pants BUILD files for several reasons:
- You might like the style that buildifier uses.
- You might be incrementally adopting Pants from Bazel, and are already using buildifier.
Please note that there are differences from Bazel's BUILD files (which are Starlark) and Pants' BUILD files (which are Python), so buildifier may issue a syntax error. In practice, these errors should be rare. See https://bazel.build/rules/language#differences_with_python.
Backend: pants.backend.build_files.fmt.buildifier
Config section: [buildifier]