Is there a built-in way for Pants to give a list o...
# general
Is there a built-in way for Pants to give a list of files that it doesn't currently cover? I'm thinking of ways to prevent, say, adding a new shell script that and forgetting to add / modify a BUILD file to make sure that it gets linted, formatted, etc.
👀 1
I can cook up something with
Copy code
comm -13 \
    <(./pants filedeps :: | sort) \
    <(git ls-tree -r HEAD --name-only | sort)
Curious if there's something a tad more elegant I'm overlooking, though.
./pants tailor
would generate the missing BUILD file targets
And it now (in the latest dev release) has a
mode where it just writes to the console which changes it would have made
So, that maybe?
You can run
./pants tailor --check
Copy code
$ ./p tailor --check
Would create BUILD:
  - Add python_requirements target requirements.txt

To fix `tailor` failures, run `./pants tailor`.
haha, yeah, Benjy beat me to it.. I found a bug in one of my PR’s while authoring this reply.. 😛
🤔 I'll give that a try... thanks!
I've tried 2.8.0rc0 and 2.8.0.dev5, and neither seems to have the
would there also be a way to tell Pants to not try and create targets in some cases? I have some things it's trying to create
entries for that I don't really need.
The upcoming 2.8 rc will have --check, along with --ignore-paths and --ignore-adding-targets so that you can ignore false positives. Planned to be released today :) for an example of the ignore options
Nice, I'll make sure to give that a try once it lands! 👍
(In case you missed it, 2.8 also has
update-build-files --check
to format build files with black and to fix safe deprecations like renaming target type names. In the future, this will be unified with
so that you have a single command to make sure your BUILD files are in tip-top shape)
I saw that... very nice stuff
❤️ 2