Has anyone tried generating docs from target/targe...
# plugins
g
Has anyone tried generating docs from target/target-types in a plugin? I'm currently handwriting my docs; but they rot quite quickly if I don't remember to update it. E.g. things like this: https://tgolsson.github.io/pants-backends/oci-readme.html
b
With 2.16, I suspect you could use
adhoc_tool
to run a rendering tool (eg sphinx, or something custom) that reads the source code.
g
Yeah; I'd likely go for custom, my goal is more from the perspective of writing a BUILD file. It feels like hooking into Pants itself is the most straightforward since there's a lot of mangling between the code as written and what goes into the BUILD file.
👍 1
c
not directly docs, but could be used as source to transform into some docs generator consumption is to use the
pants  help-all
output as it includes all the details.
g
Ooh I wasn't aware
pants help-all
was JSON! That is a very good start. Thanks @curved-television-6568! 🙇
👍 1