https://pantsbuild.org/ logo
#general
Title
# general
l

lemon-oxygen-72498

10/12/2022, 1:47 PM
Is there a formatter for
BUILD
files? I can't find one in the docs 😕
1
🙏 1
b

bitter-ability-32190

10/12/2022, 1:59 PM
There are several answers and they are all "yes" 😛 Pants 2.13 and back, you would use
./pants update-build-files
Pants 2.14 maintains that goal, but moved
black
and
yapf
formatters to also work under
fmt
through ``pants.backend.build_files.fmt.<name>` . We also added
buildifier
as well Pants 2.15 maintains that, but (hopefully) will deprecate
update-build-files
as we'll introduce a
fix
goal to shore up the non-formatting changes in
update-build-files
l

lemon-oxygen-72498

10/12/2022, 3:38 PM
Thanks for the detailed answer 👍
./pants update-build-files
it is for me now then! But good to know it will change soon 💯
b

busy-vase-39202

10/12/2022, 4:04 PM
This answer deserves to be more prominent in the docs. It's a really good question.
7 Views