Skip to content

Support enum variants documentation #144

@beeb

Description

@beeb

Is your feature request related to a problem? Please describe.

Solidity 0.8.30 added support for documenting enum variants with NatSpec, which can be done inside of the enum definition (above each value).

Describe the solution you'd like

Have lintspec correctly parse those and validate against them.

Examples:

/// @notice Test enum
enum Test {
    /// @param something
    Foo,
    /// @notice description
    Bar,
    /// @return the baz
    Baz
}

Describe alternatives you've considered

Additional context

argotorg/solidity#15956

To be determined whether adding a @notice or @dev above an enum value is considered to be valid documentation as a replacement for @param on the enum itself. Same question for @return or @param which are theoretically allowed on an enum value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions