Skip to content

Commit a0015b8

Browse files
doc_paragraphs_missing_punctuation: update the lint suggestion help
1 parent d6936cb commit a0015b8

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

clippy_lints/src/doc/doc_paragraphs_missing_punctuation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub fn check(cx: &LateContext<'_>, doc: &str, fragments: Fragments<'_>) {
2020
DOC_PARAGRAPHS_MISSING_PUNCTUATION,
2121
span,
2222
MSG,
23-
"end the doc comment with some punctuation",
23+
"end the paragraph with some punctuation",
2424
PUNCTUATION_SUGGESTION.to_string(),
2525
Applicability::MaybeIncorrect,
2626
);
@@ -35,7 +35,7 @@ pub fn check(cx: &LateContext<'_>, doc: &str, fragments: Fragments<'_>) {
3535
span,
3636
MSG,
3737
None,
38-
"end the doc comment with some punctuation",
38+
"end the paragraph with some punctuation",
3939
);
4040
}
4141
},

tests/ui/doc/doc_paragraphs_missing_punctuation.stderr

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error: doc paragraphs should end with a terminal punctuation mark
22
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:5:86
33
|
44
LL | /// Returns the Answer to the Ultimate Question of Life, the Universe, and Everything
5-
| ^ help: end the doc comment with some punctuation: `.`
5+
| ^ help: end the paragraph with some punctuation: `.`
66
|
77
= note: `-D clippy::doc-paragraphs-missing-punctuation` implied by `-D warnings`
88
= help: to override `-D warnings` add `#[allow(clippy::doc_paragraphs_missing_punctuation)]`
@@ -11,103 +11,103 @@ error: doc paragraphs should end with a terminal punctuation mark
1111
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:11:22
1212
|
1313
LL | /// The `Option` type
14-
| ^ help: end the doc comment with some punctuation: `.`
14+
| ^ help: end the paragraph with some punctuation: `.`
1515

1616
error: doc paragraphs should end with a terminal punctuation mark
1717
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:16:17
1818
|
1919
LL | /// No value
20-
| ^ help: end the doc comment with some punctuation: `.`
20+
| ^ help: end the paragraph with some punctuation: `.`
2121

2222
error: doc paragraphs should end with a terminal punctuation mark
2323
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:27:41
2424
|
2525
LL | /// only the last line triggers the lint
26-
| ^ help: end the doc comment with some punctuation: `.`
26+
| ^ help: end the paragraph with some punctuation: `.`
2727

2828
error: doc paragraphs should end with a terminal punctuation mark
2929
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:40:56
3030
|
3131
LL | /// <https://spec.commonmark.org/0.31.2/#autolinks>
32-
| ^ help: end the doc comment with some punctuation: `.`
32+
| ^ help: end the paragraph with some punctuation: `.`
3333

3434
error: doc paragraphs should end with a terminal punctuation mark
3535
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:49:26
3636
|
3737
LL | /// Here is a snippet
38-
| ^ help: end the doc comment with some punctuation: `.`
38+
| ^ help: end the paragraph with some punctuation: `.`
3939

4040
error: doc paragraphs should end with a terminal punctuation mark
4141
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:72:15
4242
|
4343
LL | /// U+0001
44-
| ^ help: end the doc comment with some punctuation: `.`
44+
| ^ help: end the paragraph with some punctuation: `.`
4545

4646
error: doc paragraphs should end with a terminal punctuation mark
4747
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:79:29
4848
|
4949
LL | //! inner attributes too
50-
| ^ help: end the doc comment with some punctuation: `.`
50+
| ^ help: end the paragraph with some punctuation: `.`
5151

5252
error: doc paragraphs should end with a terminal punctuation mark
5353
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:90:47
5454
|
5555
LL | /// **But sometimes it is missing a period**
56-
| ^ help: end the doc comment with some punctuation: `.`
56+
| ^ help: end the paragraph with some punctuation: `.`
5757

5858
error: doc paragraphs should end with a terminal punctuation mark
5959
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:95:46
6060
|
6161
LL | /// _But sometimes it is missing a period_
62-
| ^ help: end the doc comment with some punctuation: `.`
62+
| ^ help: end the paragraph with some punctuation: `.`
6363

6464
error: doc paragraphs should end with a terminal punctuation mark
6565
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:104:56
6666
|
6767
LL | /// Doc comments can end with an [inline link](#anchor)
68-
| ^ help: end the doc comment with some punctuation: `.`
68+
| ^ help: end the paragraph with some punctuation: `.`
6969

7070
error: doc paragraphs should end with a terminal punctuation mark
7171
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:108:65
7272
|
7373
LL | /// Some doc comments contain [link reference definitions][spec]
74-
| ^ help: end the doc comment with some punctuation: `.`
74+
| ^ help: end the paragraph with some punctuation: `.`
7575

7676
error: doc paragraphs should end with a terminal punctuation mark
7777
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:133:57
7878
|
7979
LL | /// Doc comments with trailing blank lines are supported
80-
| ^ help: end the doc comment with some punctuation: `.`
80+
| ^ help: end the paragraph with some punctuation: `.`
8181

8282
error: doc paragraphs should end with a terminal punctuation mark
8383
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:139:48
8484
|
8585
LL | /// This first paragraph is missing punctuation
86-
| ^ help: end the doc comment with some punctuation: `.`
86+
| ^ help: end the paragraph with some punctuation: `.`
8787

8888
error: doc paragraphs should end with a terminal punctuation mark
8989
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:143:34
9090
|
9191
LL | /// And it has multiple sentences
92-
| ^ help: end the doc comment with some punctuation: `.`
92+
| ^ help: end the paragraph with some punctuation: `.`
9393

9494
error: doc paragraphs should end with a terminal punctuation mark
9595
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:146:37
9696
|
9797
LL | /// Same for this third and last one
98-
| ^ help: end the doc comment with some punctuation: `.`
98+
| ^ help: end the paragraph with some punctuation: `.`
9999

100100
error: doc paragraphs should end with a terminal punctuation mark
101101
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:153:33
102102
|
103103
LL | /// This ends with a code `span`
104-
| ^ help: end the doc comment with some punctuation: `.`
104+
| ^ help: end the paragraph with some punctuation: `.`
105105

106106
error: doc paragraphs should end with a terminal punctuation mark
107107
--> tests/ui/doc/doc_paragraphs_missing_punctuation.rs:162:27
108108
|
109109
LL | * Block doc comments work
110-
| ^ help: end the doc comment with some punctuation: `.`
110+
| ^ help: end the paragraph with some punctuation: `.`
111111

112112
error: aborting due to 18 previous errors
113113

tests/ui/doc/doc_paragraphs_missing_punctuation_unfixable.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error: doc paragraphs should end with a terminal punctuation mark
44
LL | /// Sometimes the doc comment ends with parentheses (like this)
55
| ^
66
|
7-
= help: end the doc comment with some punctuation
7+
= help: end the paragraph with some punctuation
88
= note: `-D clippy::doc-paragraphs-missing-punctuation` implied by `-D warnings`
99
= help: to override `-D warnings` add `#[allow(clippy::doc_paragraphs_missing_punctuation)]`
1010

@@ -14,7 +14,7 @@ error: doc paragraphs should end with a terminal punctuation mark
1414
LL | /// This comment ends with "a quote"
1515
| ^
1616
|
17-
= help: end the doc comment with some punctuation
17+
= help: end the paragraph with some punctuation
1818

1919
error: aborting due to 2 previous errors
2020

0 commit comments

Comments
 (0)