Is there a way to get `list` to show the tags that...
# general
r
Is there a way to get
list
to show the tags that have been applied to targets/files?
I'm trying to filter the tests that are run by tag but finding that isn't working so wondering if I haven't applied the tag correctly.
n
There's
./pants --tag=<tag> list ::
if you only want to show targets of a specific tag. If you want to list the tags of all targets, I suppose you could do something like:
Copy code
./pants peek :: | jq -r '.[] | select(.tags != null) | .address + ": " + (.tags | join(", "))'
👍 1
r
Yeah definitely the latter is what I’m after. Would be good if I could do
./pants list --list-tags ::
w
thanks @narrow-vegetable-37489! yea, we’ve been recommending
peek
+
jq
more and more… there are so many combinations of things that folks would like to do that the generality of
jq
is very helpful.
it’s mentioned on https://www.pantsbuild.org/docs/project-introspection#peek---programmatically-inspect-a-target … but continuing to add recipes there would probably be helpful.
1
h
big +1 to adding dozens of recipes. allows people to adapt a snippet much easier