-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Detect documentation that is empty #9931
Comments
@rustbot label +good-first-issue |
@rustbot claim |
I just submitted a pull request in #10152 with my initial attempt at this. I do Rust dev daily for private work, but this is my first time contributing to the project, so please have mercy. I believe I have successfully addressed blank I have not addressed the I have not tested any other forms of doc strings either. I'm looking for:
Thanks, I'm excited to help out on this, looking for lots of constructive criticism. |
Looks like there are more cases for me to handle within functions. I just noticed I checked in two config files that have local-specific changes - I'll make sure to remove those for the final PR. |
@cgorski are you still working on it? If no then I can try to pick it up. |
Honestly, I'd call it a bit surprising that |
@rustbot claim |
taking into account this - should |
@rustbot claim |
|
What it does
Detects documentation that is empty.
Lint Name
empty-docs
Category
suspicious
Advantage
Drawbacks
missing_docs
lint being fired. However it should be possible to just use the attribute#[allow(missing_docs)]
where needed.#[forbid(missing_docs]
is enabled, removing the empty doc comments will fire the lint.str::is_whitespace
would probably satisfy that case.Example
//!
Could be written as (if
#![warn(missing_docs)]
or#![deny(missing_docs)]
):#![allow(missing_docs)]
or a message:
Could be written as (if missing_docs is not enabled)
If
#[forbid(missing_docs)]
, then we probably should advise changing forbid to deny or show the message to fill in the documentation.The text was updated successfully, but these errors were encountered: