-
Notifications
You must be signed in to change notification settings - Fork 130
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
refactor: initialised clippy::missing_panics_doc
#188
Conversation
@JayWhite2357 , to complete the doc part of it will take two to three days |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you get this to pass CI, I'm happy to merge this PR while you work on the docs in a separate PR.
It would prevent any new code from being undocumented in the meantime.
@Gmin2 it looks like I can't approve the CI workflows unless the branch conflicts are resolved. |
Hey @JayWhite2357, i think it will make sense to include docs in this PR only, wdyt? |
It doesn't matter to me. Entirely up to you. |
clippy::missing_panics_doc
clippy::missing_panics_doc
Hey @JayWhite2357, completed all the panic docs for |
If the assert is guaranteed to not panic, then it is safe to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started reviewing some of this.
The general feedback I have on this: there are some cases where an unwrap
or another panic could occur, but based on the logic of the methods, doesn't occur. This should not be included in the Panic documentation, and instead should be expect
ed away and explained in comments (no docs).
Additionally, there are a couple of spots I noted where the panic documentation could be a bit more descriptive on the root cause of why the panic occurs.
In both cases, you may have to look at, for example, why a method returns None
so that you can explain either why a panic might occur or why it cannot occur.
@Gmin2 thanks for the effort here. It is looking good! |
Hey @JayWhite2357 , i have added all the changes you have mentioned, can you take a look and one more thing can we wrap this quickly because the merge conflicts are getting bigger and bigger, if somethings needs to be adjusted we can do it in the followup PR |
clippy::missing_panics_doc
clippy::missing_panics_doc
/approve |
@JayWhite2357: The claim has been successfully added to reward-all. You can visit your dashboard to complete the payment. |
🎉 This PR is included in version 0.27.7 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Rationale for this change
In order to improve documentation and identify possible panics, we should enable clippy lints that warn when a function that panics but does not document this behavior.
What changes are included in this PR?
Added panic doc comments for all the
unwrap()
statementsFixes #163
/claim #163