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

More granular missing_docs-like lints #11914

Open
dpc opened this issue Dec 3, 2023 · 1 comment
Open

More granular missing_docs-like lints #11914

dpc opened this issue Dec 3, 2023 · 1 comment
Labels
A-lint Area: New lints

Comments

@dpc
Copy link

dpc commented Dec 3, 2023

What it does

In my experience the single most valuable docstring are ones on the structs, as there are least amount of them, yet they are the very core of every project. Then the docs on the methods, and the rest is great to have but not as important, especially for an application code.

Unfortunately there's no good way to take it into account when trying to enforce better docstring coverage, ATM. If I add #[warn(missing_docs)] trying to up our documentation game in a large project it generates tons of warning, lots of them not that important to immediately fix.

For these two reasons:

  • not all docstring types as equally valuable
  • being able to more gradually enforce better docs coverage

I'd love to have some #[warn(missing_struct_docs)], #[warn(missing_method_docs)], etc.

I originally posted this idea on https://internals.rust-lang.org/t/more-granular-missing-docs/19953 , but was suggested that making this a clippy lint (first), might be a good approach.

Advantage

No response

Drawbacks

No response

Example

na

@dpc dpc added the A-lint Area: New lints label Dec 3, 2023
@dpc dpc changed the title More granular missing_docs More granular missing_docs-like lints Dec 3, 2023
@jhpratt
Copy link
Member

jhpratt commented Dec 3, 2023

This is basically the same as #5736.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: New lints
Projects
None yet
Development

No branches or pull requests

2 participants