Skip to content

Commit 2f9342e

Browse files
doc_paragraphs_missing_punctuation: update the lint message
1 parent 52aa4a5 commit 2f9342e

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

clippy_lints/src/doc/doc_paragraphs_missing_punctuation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustc_resolve::rustdoc::pulldown_cmark::{Event, Options, Parser, Tag, TagEnd
66

77
use super::{DOC_PARAGRAPHS_MISSING_PUNCTUATION, Fragments};
88

9-
const MSG: &str = "doc comments should end with a terminal punctuation mark";
9+
const MSG: &str = "doc paragraphs should end with a terminal punctuation mark";
1010
const PUNCTUATION_SUGGESTION: char = '.';
1111

1212
pub fn check(cx: &LateContext<'_>, doc: &str, fragments: Fragments<'_>) {

tests/ui/doc/doc_paragraphs_missing_punctuation.stderr

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: doc comments should end with a terminal punctuation mark
1+
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
@@ -7,103 +7,103 @@ LL | /// Returns the Answer to the Ultimate Question of Life, the Universe, and
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)]`
99

10-
error: doc comments should end with a terminal punctuation mark
10+
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
1414
| ^ help: end the doc comment with some punctuation: `.`
1515

16-
error: doc comments should end with a terminal punctuation mark
16+
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
2020
| ^ help: end the doc comment with some punctuation: `.`
2121

22-
error: doc comments should end with a terminal punctuation mark
22+
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
2626
| ^ help: end the doc comment with some punctuation: `.`
2727

28-
error: doc comments should end with a terminal punctuation mark
28+
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>
3232
| ^ help: end the doc comment with some punctuation: `.`
3333

34-
error: doc comments should end with a terminal punctuation mark
34+
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
3838
| ^ help: end the doc comment with some punctuation: `.`
3939

40-
error: doc comments should end with a terminal punctuation mark
40+
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
4444
| ^ help: end the doc comment with some punctuation: `.`
4545

46-
error: doc comments should end with a terminal punctuation mark
46+
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
5050
| ^ help: end the doc comment with some punctuation: `.`
5151

52-
error: doc comments should end with a terminal punctuation mark
52+
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**
5656
| ^ help: end the doc comment with some punctuation: `.`
5757

58-
error: doc comments should end with a terminal punctuation mark
58+
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_
6262
| ^ help: end the doc comment with some punctuation: `.`
6363

64-
error: doc comments should end with a terminal punctuation mark
64+
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)
6868
| ^ help: end the doc comment with some punctuation: `.`
6969

70-
error: doc comments should end with a terminal punctuation mark
70+
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]
7474
| ^ help: end the doc comment with some punctuation: `.`
7575

76-
error: doc comments should end with a terminal punctuation mark
76+
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
8080
| ^ help: end the doc comment with some punctuation: `.`
8181

82-
error: doc comments should end with a terminal punctuation mark
82+
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
8686
| ^ help: end the doc comment with some punctuation: `.`
8787

88-
error: doc comments should end with a terminal punctuation mark
88+
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
9292
| ^ help: end the doc comment with some punctuation: `.`
9393

94-
error: doc comments should end with a terminal punctuation mark
94+
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
9898
| ^ help: end the doc comment with some punctuation: `.`
9999

100-
error: doc comments should end with a terminal punctuation mark
100+
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`
104104
| ^ help: end the doc comment with some punctuation: `.`
105105

106-
error: doc comments should end with a terminal punctuation mark
106+
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

tests/ui/doc/doc_paragraphs_missing_punctuation_unfixable.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: doc comments should end with a terminal punctuation mark
1+
error: doc paragraphs should end with a terminal punctuation mark
22
--> tests/ui/doc/doc_paragraphs_missing_punctuation_unfixable.rs:7:68
33
|
44
LL | /// Sometimes the doc comment ends with parentheses (like this)
@@ -8,7 +8,7 @@ LL | /// Sometimes the doc comment ends with parentheses (like this)
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

11-
error: doc comments should end with a terminal punctuation mark
11+
error: doc paragraphs should end with a terminal punctuation mark
1212
--> tests/ui/doc/doc_paragraphs_missing_punctuation_unfixable.rs:10:41
1313
|
1414
LL | /// This comment ends with "a quote"

0 commit comments

Comments
 (0)