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

Add new lint "missing_panics_doc" #6523

Merged
merged 1 commit into from
Feb 2, 2021

Conversation

brightly-salty
Copy link
Contributor

@brightly-salty brightly-salty commented Dec 30, 2020

fixes #1974
changelog: Added the "missing_panics_doc" lint which lints when public functions that may panic are missing "# Panics" in their doc comment

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @flip1995 (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Dec 30, 2020
@brightly-salty brightly-salty marked this pull request as ready for review December 31, 2020 00:26
@brightly-salty brightly-salty changed the title WIP: Add new lint "missing panics docs" Add new lint "missing panics docs" Dec 31, 2020
@brightly-salty brightly-salty changed the title Add new lint "missing panics docs" Add new lint "missing_panics_doc" Dec 31, 2020
Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

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

Welcome to Clippy! ❤️

This looks really good to me!

clippy_lints/src/doc.rs Outdated Show resolved Hide resolved
@flip1995 flip1995 added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jan 4, 2021
clippy_lints/src/doc.rs Outdated Show resolved Hide resolved
Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

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

There is still a dogfood error. Otherwise LGTM

@brightly-salty
Copy link
Contributor Author

@flip1995 I fixed it, but now there's a merge conflict that I don't have the capability to resolve. Looks like it's just a changed function signature.

@flip1995 flip1995 force-pushed the missing-panic-doc branch 2 times, most recently from 7fca6af to c222abf Compare January 7, 2021 13:32
@flip1995
Copy link
Member

flip1995 commented Jan 7, 2021

I rebased it and added the first panic location in the lint output.

With this, I now understand why the proc_macro is linted. This is a FP, I'd like to see fixed, before merging this.

@brightly-salty
Copy link
Contributor Author

I rebased it and added the first panic location in the lint output.

With this, I now understand why the proc_macro is linted. This is a FP, I'd like to see fixed, before merging this.

I don't think I understand. Your changes look good to me, just need to remove an unused import and add the span changes in another part of the codebase.

@flip1995
Copy link
Member

flip1995 commented Feb 2, 2021

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Feb 2, 2021

📌 Commit bde667a has been approved by flip1995

@bors
Copy link
Contributor

bors commented Feb 2, 2021

⌛ Testing commit bde667a with merge 28794e9...

@bors
Copy link
Contributor

bors commented Feb 2, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 28794e9 to master...

@bors bors merged commit 28794e9 into rust-lang:master Feb 2, 2021
@brightly-salty brightly-salty deleted the missing-panic-doc branch February 2, 2021 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optional lint for functions that panic without mentioning panics in rustdoc
4 participants