(further details welcome!)
cc @cristianmatache
After some discussion today, one way I could imagine this working would be for the roots goal to render:
At that point, this could be our answer to "an init goal", except rather than being one-time-use, it could be used multiple times, and report information about your layout and how you might want to adjust it.
Note that since the repo root is a source root by default, there won't be files that have no roots applied (unless that default is purposely overridden).
@benjyw : True. Although even if everything has a source root, files might still not have an owning target, which would be roughly equivalent to not having a source root. This is a parallel universe of requirements: both 1) file layout, 2) targets are necessary.
(aside: the docs that @Eric-Arellano has written about source roots are great: https://www.pantsbuild.org/v2.3/docs/source-roots ... this hypothetical goal might be assisting with applying that advice)
Most helpful comment
Implemented! https://blog.pantsbuild.org/tailoring-pants-to-your-codebase/