primitivefinance / primitive-dodoc

☄️ Zero-config Hardhat plugin to generate documentation for all your Solidity contracts.
MIT License
135 stars 16 forks source link

Lots of `undefined` for function params descriptions #34

Open sebastiantf opened 2 years ago

sebastiantf commented 2 years ago

The generated docs are having a lot of undefined for some ~function parameters~ function parameters descriptions, while for some function parameters they are are appearing good, even though the Natspec is in the correct format and the same.

When running on debugMode, the dev docs have the correct parameters and descriptions, without any undefined. But they do not persist till the markdown output

I noticed this in the Primitive docs too: https://library.primitive.xyz/technical/smart-contracts/autogenerated-docs/core/PrimitiveEngine#parameters-1

clemlak commented 2 years ago

This can happen with unnamed parameters (for example when using public mappings, etc), I'll try to investigate this though, because it's a bit annoying!

sebastiantf commented 2 years ago

Can you please elaborate "unnamed parameters"? I wasn't using any public mapping. There were some unnamed return variables though.

clemlak commented 2 years ago

All right, then this might be the same issue: when parameters are unnamed, Dodoc might export their name as undefined. Let's see if we can figure something better though, any ideas?

sebastiantf commented 2 years ago

Oh man! I just realized I was saying the wrong thing 🤦🏻‍♂️

I actually meant that the descriptions for the function params were undefined not exactly the params themselves.

Apologies for the confusion