Skip to content

Commit 7644194

Browse files
committed
Rename doc_comment_double_space_linebreak -> doc_comment_double_space_linebreaks
1 parent 60191cf commit 7644194

6 files changed

+15
-16
lines changed

Diff for: clippy_lints/src/declared_lints.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ pub static LINTS: &[&crate::LintInfo] = &[
137137
crate::disallowed_names::DISALLOWED_NAMES_INFO,
138138
crate::disallowed_script_idents::DISALLOWED_SCRIPT_IDENTS_INFO,
139139
crate::disallowed_types::DISALLOWED_TYPES_INFO,
140-
crate::doc::DOC_COMMENT_DOUBLE_SPACE_LINEBREAK_INFO,
140+
crate::doc::DOC_COMMENT_DOUBLE_SPACE_LINEBREAKS_INFO,
141141
crate::doc::DOC_INCLUDE_WITHOUT_CFG_INFO,
142142
crate::doc::DOC_LAZY_CONTINUATION_INFO,
143143
crate::doc::DOC_LINK_CODE_INFO,

Diff for: clippy_lints/src/doc/doc_comment_double_space_linebreak.rs renamed to clippy_lints/src/doc/doc_comment_double_space_linebreaks.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use rustc_errors::Applicability;
33
use rustc_lint::LateContext;
44
use rustc_span::{BytePos, Span};
55

6-
use super::DOC_COMMENT_DOUBLE_SPACE_LINEBREAK;
6+
use super::DOC_COMMENT_DOUBLE_SPACE_LINEBREAKS;
77

88
pub fn check(cx: &LateContext<'_>, collected_breaks: &[Span]) {
99
if collected_breaks.is_empty() {
@@ -17,7 +17,7 @@ pub fn check(cx: &LateContext<'_>, collected_breaks: &[Span]) {
1717

1818
span_lint_and_then(
1919
cx,
20-
DOC_COMMENT_DOUBLE_SPACE_LINEBREAK,
20+
DOC_COMMENT_DOUBLE_SPACE_LINEBREAKS,
2121
breaks.clone(),
2222
"doc comment uses two spaces for a hard line break",
2323
|diag| {

Diff for: clippy_lints/src/doc/mod.rs

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#![allow(clippy::lint_without_lint_pass)]
22

3-
mod lazy_continuation;
4-
mod too_long_first_doc_paragraph;
5-
63
use clippy_config::Conf;
74
use clippy_utils::attrs::is_doc_hidden;
85
use clippy_utils::diagnostics::{span_lint, span_lint_and_help, span_lint_and_then};
@@ -34,13 +31,15 @@ use rustc_span::{Span, sym};
3431
use std::ops::Range;
3532
use url::Url;
3633

37-
mod doc_comment_double_space_linebreak;
34+
mod doc_comment_double_space_linebreaks;
3835
mod include_in_doc_without_cfg;
36+
mod lazy_continuation;
3937
mod link_with_quotes;
4038
mod markdown;
4139
mod missing_headers;
4240
mod needless_doctest_main;
4341
mod suspicious_doc_comments;
42+
mod too_long_first_doc_paragraph;
4443

4544
declare_clippy_lint! {
4645
/// ### What it does
@@ -595,8 +594,8 @@ declare_clippy_lint! {
595594
/// l + r
596595
/// }
597596
/// ```
598-
#[clippy::version = "1.80.0"]
599-
pub DOC_COMMENT_DOUBLE_SPACE_LINEBREAK,
597+
#[clippy::version = "1.87.0"]
598+
pub DOC_COMMENT_DOUBLE_SPACE_LINEBREAKS,
600599
pedantic,
601600
"double-space used for doc comment linebreak instead of `\\`"
602601
}
@@ -632,7 +631,7 @@ impl_lint_pass!(Documentation => [
632631
DOC_OVERINDENTED_LIST_ITEMS,
633632
TOO_LONG_FIRST_DOC_PARAGRAPH,
634633
DOC_INCLUDE_WITHOUT_CFG,
635-
DOC_COMMENT_DOUBLE_SPACE_LINEBREAK
634+
DOC_COMMENT_DOUBLE_SPACE_LINEBREAKS
636635
]);
637636

638637
impl EarlyLintPass for Documentation {
@@ -1164,7 +1163,7 @@ fn check_doc<'a, Events: Iterator<Item = (pulldown_cmark::Event<'a>, Range<usize
11641163
}
11651164
}
11661165

1167-
doc_comment_double_space_linebreak::check(cx, &collected_breaks);
1166+
doc_comment_double_space_linebreaks::check(cx, &collected_breaks);
11681167

11691168
headers
11701169
}

Diff for: tests/ui/doc/doc_comment_double_space_linebreak.stderr renamed to tests/ui/doc/doc_comment_double_space_linebreaks.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
error: doc comment uses two spaces for a hard line break
2-
--> tests/ui/doc/doc_comment_double_space_linebreak.rs:7:43
2+
--> tests/ui/doc/doc_comment_double_space_linebreaks.rs:7:43
33
|
44
LL | //! Should warn on double space linebreaks
55
| ^^
66
|
77
= help: replace this double space with a backslash: `\`
88
= note: `-D clippy::doc-comment-double-space-linebreak` implied by `-D warnings`
9-
= help: to override `-D warnings` add `#[allow(clippy::doc_comment_double_space_linebreak)]`
9+
= help: to override `-D warnings` add `#[allow(clippy::doc_comment_double_space_linebreaks)]`
1010

1111
error: doc comment uses two spaces for a hard line break
12-
--> tests/ui/doc/doc_comment_double_space_linebreak.rs:35:51
12+
--> tests/ui/doc/doc_comment_double_space_linebreaks.rs:35:51
1313
|
1414
LL | /// Should warn when doc comment uses double space
1515
| ^^
@@ -19,7 +19,7 @@ LL | /// as a line-break, even when there are multiple
1919
= help: replace this double space with a backslash: `\`
2020

2121
error: doc comment uses two spaces for a hard line break
22-
--> tests/ui/doc/doc_comment_double_space_linebreak.rs:44:12
22+
--> tests/ui/doc/doc_comment_double_space_linebreaks.rs:44:12
2323
|
2424
LL | /// 🌹 are 🟥
2525
| ^^
@@ -33,7 +33,7 @@ LL | /// and so are 🫵
3333
= help: replace this double space with a backslash: `\`
3434

3535
error: doc comment uses two spaces for a hard line break
36-
--> tests/ui/doc/doc_comment_double_space_linebreak.rs:86:16
36+
--> tests/ui/doc/doc_comment_double_space_linebreaks.rs:86:16
3737
|
3838
LL | /// here we mix
3939
| ^^

0 commit comments

Comments
 (0)