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

Added support for NatSpec in the UDVT definition AST node #14166

Closed
wants to merge 0 commits into from

Conversation

veniger
Copy link
Contributor

@veniger veniger commented Apr 27, 2023

Added NatSpec documentation to the User Defined Value Type definition AST node
Partially fixes: #12295

@github-actions
Copy link

Thank you for your contribution to the Solidity compiler! A team member will follow up shortly.

If you haven't read our contributing guidelines and our review checklist before, please do it now, this makes the reviewing process and accepting your contribution smoother.

If you have any questions or need our help, feel free to post them in the PR or talk to us directly on the #solidity-dev channel on Matrix.

@veniger veniger marked this pull request as ready for review April 28, 2023 11:00
nikola-matic
nikola-matic previously approved these changes May 2, 2023
Copy link
Collaborator

@nikola-matic nikola-matic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. @cameel please take a final look.

Copy link
Member

@cameel cameel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gave this only a brief look, but I don't see anything outright wrong so I'm fine with merging when @nikola-matic approves.

I only have some suggestions as to tests/docs (see below). Also, you have some stray empty lines in the changelog.

Comment on lines 2 to 3
/// @title example of title
/// @author example of author
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure @title and @author make sense here. They were meant for contracts. But I think we already allowed them for structs and enums so I guess for consistency it's better to allow them here too.

The table listing what is usable where should be updated though: https://docs.soliditylang.org/en/latest/natspec-format.html#tags

Also, is @custom allowed? The docs say it's allowed everywhere, but if it is, it would be better to include it in the test to show that.

@gabrielkrell
Copy link

Bumping, I would like this. UDVTs render pretty poorly in my documentation without being able to annotate them in any way.

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

Successfully merging this pull request may close these issues.

[AST] Consider expanding the use of NatSpec documentation to all declarations.
4 participants