quaint-telephone-89068
11/30/2022, 8:02 PM__dependents_rules__ and __dependencies_rules__) programmatically, e.g. via the peek command. When the rule selectors are expanded to real files, one could answer a variety of questions, e.g. "who is allowed to import this particular Python module?". Having raw globs (like with have dependencies_raw in the peek) would also do some linting (e.g. "don't forget to add a fall-thorough pattern" or "make sure all 3rd party requirements imported in a module are allowed to depend on in a rule").
Describe the solution you'd like
When running ./pants peek project/subdir, I'd like to get information about the visibility rules defined in a BUILD file in this directory (both raw and with expanded paths).
Describe alternatives you've considered
peek works on targets, so maybe making it aware of the visibility rules would complicate the logic. Another auxiliary goal or a separate tooling may also make sense.
Linked to #17634.
pantsbuild/pants