More granular `missing_docs`?

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.

Does it seam like a good idea? Thoughts and feedback appreciated.

4 Likes

Maybe those more granular lints should be added first to clippy.

5 Likes

Probably yes.

1 Like

For reference: opened More granular `missing_docs`-like lints · Issue #11914 · rust-lang/rust-clippy · GitHub

1 Like