Open
Description
Component
Forge
Describe the feature you would like
Currently, solidity doesn't support @param
for enums (according to the natspec format). So when generating the documentation with forge doc
, there is no way to document each enum variant.
The suggestion is to define a @custom:variant
item to describe each enum variant.
Foundry already does something similar with unnamed function params ( see here ).
Additional context
Example of result:
/**
* @dev Enum representing the status of a transaction
* @custom:variant Pending the transaction is pending
* @custom:variant Done the transaction is done
* @custom:variant Revert the transaction is revert
*/
enum Transaction {
Pending,
Done,
Revert
}
Metadata
Metadata
Assignees
Type
Projects
Status
Ready For Review