-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Docs: NatSpec and/or style guide should specify how multi-line NatSpec works #11359
Comments
Hey @cameel, I would like to work on this issue if it isn't resolved yet. Could I be assigned? |
Sure, just be aware that this is a task that requires some discusion and making a decision on which style we should recommend (and if we should recommend a single style at all). I think that submitting a draft PR with a particular proposal is a good way to get that discussion started though so you can go ahead if you want to try. Just be prepared that there might be some going back and forth in the PR before we agree on a final version :) I'd suggest to start with just describing the style and only updating all the examples when it's clear which style we want (though updating one or two examples might also be a good way to show off the style you choose). It would also be good to check if there's one clearly preferred style used in contracts found in the wild. Or what existing linters already recommend - I see that for example solhint does not lint natspec yet and there's a very recent feature request from @fulldecent to add support for it: protofire/solhint#298. |
Thank you for your interest. Also want to note my main interest in this issue. Overall my goal is that all Solidity functions should be commented, consistently (no dog shedding), by default, and complained loudly when missing, and have consistent/specified interpretation. And when that happens we might hope that a browser-based web3 wallet will make this information available to you every time you sign something. |
@fulldecent, is there any progress on the task or it is deprecated now? |
I think it's not just "style guide" thing; also the compiler should generate correct multi-line spec with the suggested multi-lining! |
This issue has been marked as stale due to inactivity for the last 90 days. |
Hi everyone! This issue has been automatically closed due to inactivity. |
is there any best practices recommendation for this case? |
My personal recommendation is still align with tags and params. But can't say this is universally recognized. |
Regarding: https://docs.soliditylang.org/en/v0.8.4/natspec-format.html
Many people choose to limit source code line lengths to 79 characters wrap (or some other number). This is an identified best practice in the Solidity Style Guide. And comments can (SHOULD!) be more than just several characters. So...
Let's specify how longer comments should work:
References
Discussion
@param
s.Recommended work plan:
///
format is listed before/**
in the NatSpec, and all examples use///
, not/**
, but we do NOT publicly recommend///
over/**
.The text was updated successfully, but these errors were encountered: