-
Notifications
You must be signed in to change notification settings - Fork 120
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 @param in default template #294
Comments
You can set a template to customize the output. Copy All of the information you want is available in the template. You can find some examples and WIP documentation in #290. |
Okay, I see. Thanks. Anyway, I'd propose to use more user-friendly template as default (when one comes live). Thanks for a quick answer, as always! |
I agree that parameters should be included by default. Would appreciate a PR if you wanted to provide one! |
I'm working on it right now. Could you also help me with following: how do I add contract description in hbs template? I'm lurking at https://github.com/OpenZeppelin/solidity-docgen/blob/9bd50c32841d1e9500fa35fce48dc541d72cd8bb/src/source.ts but didn't find a way to do so. For example: /// @title Prevents delegatecall to a contract
/// @notice Base contract that provides a modifier for preventing delegatecall to methods in a child contract
abstract contract NoDelegateCall {
} I'd like to get this comment to output |
|
Hey. Why not I guess. There is only one caveat: I have two versions to work with readthedocs (rst) and gitbook(md). The former requires some postprocessing to make it work but if you're fine with gitbook you probably don't need anything. This is my template:
Hope this helps! |
Thanks a lot! Made me realize using comments like
Doesn't work, has to be written like
|
@Pzixel Thank you for sharing! Is the setup with Gitbook available in a public repo? I'd love to see. |
AFAIK it's going to be published soonish but not quite yet. So unfortunately I cannot share it right now. |
Then let's check some file. I've took IUniswapV3Factory.sol as example.
This is how item is documented:
And this is actual result of
npx solidity-docgen
output:You can see that only
notice
message got rendered.Expected result:
Used version: solidity-docgen/0.5.13 win32-x64 node-v16.0.0
I'm not sure how you're using solc internally (as I asked in another comment out there) but from what I've seen it only returns some comments in
--devdoc
and some only in--userdoc
, so I'd propose tool to merge calls to both (possibly behind similarly named flags?)The text was updated successfully, but these errors were encountered: