fix: warn on empty line outer AttrKind::DocComment#10691
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Jarcho (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
61e4b45 to
fcde813
Compare
|
@smoelius, would you be able to review this? 😄 |
|
I'd be happy to. But I am not a Clippy maintainer. So my feedback wouldn't carry any "official" weight. Would you still like me to review it? |
Jarcho
left a comment
There was a problem hiding this comment.
Sorry for the long wait. I've been out sick for the past week so I've been moving through things slowly.
| /// by the AST. However, the average user likely considers them to be different. | ||
| /// Checking for empty lines after each of these attributes is split into two different | ||
| /// lints but can share the same logic. | ||
| fn check_empty_line_after_outer_attr_kind(cx: &EarlyContext<'_>, item: &rustc_ast::Item, lint_doc_comment: bool) { |
There was a problem hiding this comment.
There's no reason to run over the attributes twice here. Just lint all attributes on the same pass through. If the lint isn't enabled then the generated message is suppressed in the span_lint call.
There was a problem hiding this comment.
Ah cool, changes made!
changelog: [`empty_line_after_doc_comments`]: add lint for checking empty lines after rustdoc comments. Fixes: rust-lang#10395
fcde813 to
0a4cfbf
Compare
No worries, totally understandable! Changes have been made. @rustbot review |
|
Thank you. @bors r+ |
|
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
1 similar comment
|
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
changelog: [
empty_line_after_doc_comments]: add lint for checking empty lines after rustdoc comments.Fixes: #10395