Skip to content

Commit 131c8f6

Browse files
author
Michael Wright
committed
Add [rustfmt::skip] to doc_markdown tests
1 parent 00baf7a commit 131c8f6

File tree

3 files changed

+33
-31
lines changed

3 files changed

+33
-31
lines changed

ci/base-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ rustup override set nightly
5959
# avoid loop spam and allow cmds with exit status != 0
6060
set +ex
6161

62-
for file in `find tests -not -path "tests/ui/doc.rs" -not -path "tests/ui/unused_unit.rs" | grep "\.rs$"` ; do
62+
for file in `find tests -not -path "tests/ui/unused_unit.rs" | grep "\.rs$"` ; do
6363
rustfmt ${file} --check
6464
if [ $? -ne 0 ]; then
6565
echo "${file} needs reformatting!"

tests/ui/doc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
33
#![allow(dead_code)]
44
#![warn(clippy::doc_markdown)]
5+
#![feature(custom_inner_attributes)]
6+
#![rustfmt::skip]
57

68
/// The foo_bar function does _nothing_. See also foo::bar. (note the dot there)
79
/// Markdown is _weird_. I mean _really weird_. This \_ is ok. So is `_`. But not Foo::some_fun

tests/ui/doc.stderr

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,181 +7,181 @@ LL | //! This file tests for the DOC_MARKDOWN lint
77
= note: `-D clippy::doc-markdown` implied by `-D warnings`
88

99
error: you should put `foo_bar` between ticks in the documentation
10-
--> $DIR/doc.rs:6:9
10+
--> $DIR/doc.rs:8:9
1111
|
1212
LL | /// The foo_bar function does _nothing_. See also foo::bar. (note the dot there)
1313
| ^^^^^^^
1414

1515
error: you should put `foo::bar` between ticks in the documentation
16-
--> $DIR/doc.rs:6:51
16+
--> $DIR/doc.rs:8:51
1717
|
1818
LL | /// The foo_bar function does _nothing_. See also foo::bar. (note the dot there)
1919
| ^^^^^^^^
2020

2121
error: you should put `Foo::some_fun` between ticks in the documentation
22-
--> $DIR/doc.rs:7:84
22+
--> $DIR/doc.rs:9:84
2323
|
2424
LL | /// Markdown is _weird_. I mean _really weird_. This /_ is ok. So is `_`. But not Foo::some_fun
2525
| ^^^^^^^^^^^^^
2626

2727
error: you should put `a::global:path` between ticks in the documentation
28-
--> $DIR/doc.rs:9:15
28+
--> $DIR/doc.rs:11:15
2929
|
3030
LL | /// Here be ::a::global:path.
3131
| ^^^^^^^^^^^^^^
3232

3333
error: you should put `NotInCodeBlock` between ticks in the documentation
34-
--> $DIR/doc.rs:10:22
34+
--> $DIR/doc.rs:12:22
3535
|
3636
LL | /// That's not code ~NotInCodeBlock~.
3737
| ^^^^^^^^^^^^^^
3838

3939
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
40-
--> $DIR/doc.rs:11:5
40+
--> $DIR/doc.rs:13:5
4141
|
4242
LL | /// be_sure_we_got_to_the_end_of_it
4343
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4444

4545
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
46-
--> $DIR/doc.rs:25:5
46+
--> $DIR/doc.rs:27:5
4747
|
4848
LL | /// be_sure_we_got_to_the_end_of_it
4949
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5050

5151
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
52-
--> $DIR/doc.rs:32:5
52+
--> $DIR/doc.rs:34:5
5353
|
5454
LL | /// be_sure_we_got_to_the_end_of_it
5555
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5656

5757
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
58-
--> $DIR/doc.rs:46:5
58+
--> $DIR/doc.rs:48:5
5959
|
6060
LL | /// be_sure_we_got_to_the_end_of_it
6161
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6262

6363
error: you should put `link_with_underscores` between ticks in the documentation
64-
--> $DIR/doc.rs:50:22
64+
--> $DIR/doc.rs:52:22
6565
|
6666
LL | /// This test has [a link_with_underscores][chunked-example] inside it. See #823.
6767
| ^^^^^^^^^^^^^^^^^^^^^
6868

6969
error: you should put `inline_link2` between ticks in the documentation
70-
--> $DIR/doc.rs:53:21
70+
--> $DIR/doc.rs:55:21
7171
|
7272
LL | /// It can also be [inline_link2].
7373
| ^^^^^^^^^^^^
7474

7575
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
76-
--> $DIR/doc.rs:63:5
76+
--> $DIR/doc.rs:65:5
7777
|
7878
LL | /// be_sure_we_got_to_the_end_of_it
7979
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8080

8181
error: you should put `CamelCaseThing` between ticks in the documentation
82-
--> $DIR/doc.rs:71:8
82+
--> $DIR/doc.rs:73:8
8383
|
8484
LL | /// ## CamelCaseThing
8585
| ^^^^^^^^^^^^^^
8686

8787
error: you should put `CamelCaseThing` between ticks in the documentation
88-
--> $DIR/doc.rs:74:7
88+
--> $DIR/doc.rs:76:7
8989
|
9090
LL | /// # CamelCaseThing
9191
| ^^^^^^^^^^^^^^
9292

9393
error: you should put `CamelCaseThing` between ticks in the documentation
94-
--> $DIR/doc.rs:76:22
94+
--> $DIR/doc.rs:78:22
9595
|
9696
LL | /// Not a title #897 CamelCaseThing
9797
| ^^^^^^^^^^^^^^
9898

9999
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
100-
--> $DIR/doc.rs:77:5
100+
--> $DIR/doc.rs:79:5
101101
|
102102
LL | /// be_sure_we_got_to_the_end_of_it
103103
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104104

105105
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
106-
--> $DIR/doc.rs:84:5
106+
--> $DIR/doc.rs:86:5
107107
|
108108
LL | /// be_sure_we_got_to_the_end_of_it
109109
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
110110

111111
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
112-
--> $DIR/doc.rs:97:5
112+
--> $DIR/doc.rs:99:5
113113
|
114114
LL | /// be_sure_we_got_to_the_end_of_it
115115
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
116116

117117
error: you should put `FooBar` between ticks in the documentation
118-
--> $DIR/doc.rs:108:42
118+
--> $DIR/doc.rs:110:42
119119
|
120120
LL | /** E.g. serialization of an empty list: FooBar
121121
| ^^^^^^
122122

123123
error: you should put `BarQuz` between ticks in the documentation
124-
--> $DIR/doc.rs:113:5
124+
--> $DIR/doc.rs:115:5
125125
|
126126
LL | And BarQuz too.
127127
| ^^^^^^
128128

129129
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
130-
--> $DIR/doc.rs:114:1
130+
--> $DIR/doc.rs:116:1
131131
|
132132
LL | be_sure_we_got_to_the_end_of_it
133133
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134134

135135
error: you should put `FooBar` between ticks in the documentation
136-
--> $DIR/doc.rs:119:42
136+
--> $DIR/doc.rs:121:42
137137
|
138138
LL | /** E.g. serialization of an empty list: FooBar
139139
| ^^^^^^
140140

141141
error: you should put `BarQuz` between ticks in the documentation
142-
--> $DIR/doc.rs:124:5
142+
--> $DIR/doc.rs:126:5
143143
|
144144
LL | And BarQuz too.
145145
| ^^^^^^
146146

147147
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
148-
--> $DIR/doc.rs:125:1
148+
--> $DIR/doc.rs:127:1
149149
|
150150
LL | be_sure_we_got_to_the_end_of_it
151151
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
152152

153153
error: you should put `be_sure_we_got_to_the_end_of_it` between ticks in the documentation
154-
--> $DIR/doc.rs:136:5
154+
--> $DIR/doc.rs:138:5
155155
|
156156
LL | /// be_sure_we_got_to_the_end_of_it
157157
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
158158

159159
error: you should put bare URLs between `<`/`>` or make a proper Markdown link
160-
--> $DIR/doc.rs:163:13
160+
--> $DIR/doc.rs:165:13
161161
|
162162
LL | /// Not ok: http://www.unicode.org
163163
| ^^^^^^^^^^^^^^^^^^^^^^
164164

165165
error: you should put bare URLs between `<`/`>` or make a proper Markdown link
166-
--> $DIR/doc.rs:164:13
166+
--> $DIR/doc.rs:166:13
167167
|
168168
LL | /// Not ok: https://www.unicode.org
169169
| ^^^^^^^^^^^^^^^^^^^^^^^
170170

171171
error: you should put bare URLs between `<`/`>` or make a proper Markdown link
172-
--> $DIR/doc.rs:165:13
172+
--> $DIR/doc.rs:167:13
173173
|
174174
LL | /// Not ok: http://www.unicode.org/
175175
| ^^^^^^^^^^^^^^^^^^^^^^
176176

177177
error: you should put bare URLs between `<`/`>` or make a proper Markdown link
178-
--> $DIR/doc.rs:166:13
178+
--> $DIR/doc.rs:168:13
179179
|
180180
LL | /// Not ok: http://www.unicode.org/reports/tr9/#Reordering_Resolved_Levels
181181
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
182182

183183
error: you should put `mycrate::Collection` between ticks in the documentation
184-
--> $DIR/doc.rs:172:22
184+
--> $DIR/doc.rs:174:22
185185
|
186186
LL | /// An iterator over mycrate::Collection's values.
187187
| ^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)