-
Notifications
You must be signed in to change notification settings - Fork 1.7k
move suspicious_doc_comments
to doc pass
#11798
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
Conversation
r? @giraffate (rustbot has picked a reviewer for you, use r? to override) |
The |
@bors r+ While I'm already here, I went ahead and reviewed the PR. Thanks for cleaning this up! |
@flip1995 That's a good idea. Same for |
|
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Split `doc.rs` up into a subdirectory So, first, sorry for the bad diff. 😅 In #11798, `@flip1995` suggested splitting `doc.rs` up, much like how we have the `methods/`, `matches/`, `types/` subdirectories. I agree with this, the file is getting bigger as we add more and more doc lints that it makes sense to do this refactoring. This is purely an internal change that moves things around a bit. (**EDIT:** depending on the outcome of #11801 (comment) , this may change the lint group name from `doc_markdoc` to `doc`). I tried to not change any of the actual logic of the lints and as such some things weren't as easy to move to a separate file. So we still have some `span_lint*` calls in the `doc/mod.rs` file, which I think is fine. This is also the case in `methods/mod.rs`. Also worth mentioning that the lints missing_errors_doc, missing_panics_doc, missing_safety_doc and unnecessary_safety_doc have a lot of the same logic so it didn't make much sense for each of these to be in their own file. Instead I just put them all in `missing_headers.rs` I also added a bit of documentation to the involved `check_{attrs,doc}` methods. changelog: none
Split `doc.rs` up into a subdirectory So, first, sorry for the bad diff. 😅 In #11798, `@flip1995` suggested splitting `doc.rs` up, much like how we have the `methods/`, `matches/`, `types/` subdirectories. I agree with this, the file is getting bigger as we add more and more doc lints that it makes sense to do this refactoring. This is purely an internal change that moves things around a bit. (**EDIT:** depending on the outcome of #11801 (comment) , this may change the lint group name from `doc_markdoc` to `doc`). I tried to not change any of the actual logic of the lints and as such some things weren't as easy to move to a separate file. So we still have some `span_lint*` calls in the `doc/mod.rs` file, which I think is fine. This is also the case in `methods/mod.rs`. Also worth mentioning that the lints missing_errors_doc, missing_panics_doc, missing_safety_doc and unnecessary_safety_doc have a lot of the same logic so it didn't make much sense for each of these to be in their own file. Instead I just put them all in `missing_headers.rs` I also added a bit of documentation to the involved `check_{attrs,doc}` methods. changelog: none
Split `doc.rs` up into a subdirectory So, first, sorry for the bad diff. 😅 In #11798, `@flip1995` suggested splitting `doc.rs` up, much like how we have the `methods/`, `matches/`, `types/` subdirectories. I agree with this, the file is getting bigger as we add more and more doc lints that it makes sense to do this refactoring. This is purely an internal change that moves things around a bit. (**EDIT:** depending on the outcome of #11801 (comment) , this may change the lint group name from `doc_markdoc` to `doc`). I tried to not change any of the actual logic of the lints and as such some things weren't as easy to move to a separate file. So we still have some `span_lint*` calls in the `doc/mod.rs` file, which I think is fine. This is also the case in `methods/mod.rs`. Also worth mentioning that the lints missing_errors_doc, missing_panics_doc, missing_safety_doc and unnecessary_safety_doc have a lot of the same logic so it didn't make much sense for each of these to be in their own file. Instead I just put them all in `missing_headers.rs` I also added a bit of documentation to the involved `check_{attrs,doc}` methods. changelog: none
This was my first lint. I've been meaning to move it over to
doc.rs
since that's a better place.There weren't any changes made to the lint logic itself.
I guess this can be considered part of #11493
changelog: none