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

New lint: missing_panic_doc #6430

Closed
vanillajonathan opened this issue Dec 7, 2020 · 7 comments
Closed

New lint: missing_panic_doc #6430

vanillajonathan opened this issue Dec 7, 2020 · 7 comments
Assignees
Labels
A-lint Area: New lints good-first-issue These issues are a good way to get started with Clippy

Comments

@vanillajonathan
Copy link

vanillajonathan commented Dec 7, 2020

What it does

Checks for missing documentation.

Lints

  • Module not documented.
  • Trait not documented.
  • Trait method not documented.
  • Enum not documented.
  • Enum variant not documented.
  • Struct not documented.
  • Struct method not documented.
  • Function not documented.
  • Panic not documented.
  • README.md missing.
@vanillajonathan vanillajonathan added the A-lint Area: New lints label Dec 7, 2020
@giraffate
Copy link
Contributor

FYI rustc has a missing_doc lint and Clippy has a missing_docs_in_private_items.

@vanillajonathan vanillajonathan changed the title New clipps::docs lint category New clippy::docs lint category Dec 7, 2020
@taiki-e
Copy link
Member

taiki-e commented Dec 8, 2020

  • Panic not documented.

As Clippy has a similar lint for functions that return errors, I think it makes sense to have a lint for functions that may panics.

  • Module not documented.
  • Trait not documented.
  • Trait method not documented.
  • Enum not documented.
  • Enum variant not documented.
  • Struct not documented.
  • Struct method not documented.
  • Function not documented.

I think these are detected by missing_doc and missing_docs_in_private_items that @giraffate mentioned.

  • README.md missing.

I think this is covered by cargo_common_metadata. (aside from whether it will be used for this purpose)

@ebroto
Copy link
Member

ebroto commented Dec 8, 2020

I think these are detected by missing_doc and missing_docs_in_private_items that @giraffate mentioned.

Yep, you can check this in the playground.

Panic not documented.

As Clippy has a similar lint for functions that return errors, I think it makes sense to have a lint for functions that may panics.

There's also missing_safety_doc. I think it makes sense to add a lint for this. Since it's the only remaining case that it's not currently linted, I will change also the description of the issue to reflect that.

@ebroto ebroto changed the title New clippy::docs lint category New lint: missing_panic_doc Dec 8, 2020
@ebroto ebroto added the good-first-issue These issues are a good way to get started with Clippy label Dec 8, 2020
@camsteffen
Copy link
Contributor

Duplicates #1974

@brightly-salty
Copy link
Contributor

Hey, I'm a would-be first-time contributor. Could I tentatively claim this? Thanks

@brightly-salty
Copy link
Contributor

@rustbot claim

@camsteffen
Copy link
Contributor

@brightly-salty Go ahead and claim #1974 which this issue duplicates. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: New lints good-first-issue These issues are a good way to get started with Clippy
Projects
None yet
Development

No branches or pull requests

6 participants