Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add types in the parameter table when generating function document with Stardoc #73

Open
lisaonduty opened this issue Oct 1, 2020 · 0 comments

Comments

@lisaonduty
Copy link

We are trying to use Stardoc when generating documentation for our Bazel macros. I can get a table generated with parameter descriptions when follow the instruction here: Macro/Function documentation

But we would also like to add the parameter Type in the table.
According to DocstringUtils.java it seems like we shall write the Type in parentheses after the parameter name but before colon, as this example:

another_parameter (unused, mutable): a parameter may be followed by additional attributes in parenthese

I have seen that it's possible to add a rule template to the stardoc() rule (attribute: func_template). I started to use an own copy of the default template to play around with: //stardoc:templates/markdown_tables/func.vm
If I have understood correctly it doesn't seem that the attributes that I add in paranthese is fetched. And I don't think that I will be able to retreive that information by just updating the template. So I think that it will need an update in the Stardoc code for this, correct?! Is that something that is already planned? If I'm not correct then I would appreciate information how I can retreive the value of the attribute.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants