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

average-australia-85137

07/08/2021, 7:19 PM
I am wondering how everyone is using pants tailor? do you have it run in a git hook? or some automatically some other way? or only manually?
h

hundreds-father-404

07/08/2021, 7:25 PM
I think there's room to improve it, like adding a
--check
option perhaps that will error if files are missing. Maybe even hook it up to
./pants lint
We would probably need a way to tell
./pants tailor
to ignore certain dirs tho, which right now you can use
pants_ignore
but there may be a better approach
r

rapid-bird-79300

07/08/2021, 7:39 PM
On my team we have an automated script that will run tailor and ensure BUILD files are up to date. This check also runs in our CI pipelines. Like @hundreds-father-404 said you have to be sure the
pants_ignore
is up to date because it will target non-source roots (+1 for the
--check
option and
./pants lint
integration). I think the git hook is a good idea. Developers can also run this check manually, we have a PyCharm external tool to help with this too.