Skip to content

Commit 7ba9042

Browse files
committed
make cargo test pass
1 parent 26f5039 commit 7ba9042

File tree

4 files changed

+87
-55
lines changed

4 files changed

+87
-55
lines changed

lintcheck/lintcheck_crates.toml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,38 @@
11
[crates]
22
# some of these are from cargotest
3-
bevy = {name = "bevy", versions = ['0.10.1']}
4-
deno = {name = "deno", versions = ['1.34.2']}
3+
cargo = {name = "cargo", versions = ['0.64.0']}
4+
iron = {name = "iron", versions = ['0.6.1']}
5+
ripgrep = {name = "ripgrep", versions = ['12.1.1']}
6+
xsv = {name = "xsv", versions = ['0.13.0']}
7+
# commented out because of 173K clippy::match_same_arms msgs in language_type.rs
8+
#tokei = { name = "tokei", versions = ['12.0.4']}
9+
rayon = {name = "rayon", versions = ['1.5.0']}
10+
serde = {name = "serde", versions = ['1.0.118']}
11+
# top 10 crates.io dls
12+
bitflags = {name = "bitflags", versions = ['1.2.1']}
13+
# crash = {name = "clippy_crash", path = "/tmp/clippy_crash"}
14+
libc = {name = "libc", versions = ['0.2.81']}
15+
log = {name = "log", versions = ['0.4.11']}
16+
proc-macro2 = {name = "proc-macro2", versions = ['1.0.24']}
17+
quote = {name = "quote", versions = ['1.0.7']}
18+
rand = {name = "rand", versions = ['0.7.3']}
19+
rand_core = {name = "rand_core", versions = ['0.6.0']}
20+
regex = {name = "regex", versions = ['1.3.2']}
21+
syn = {name = "syn", versions = ['1.0.54']}
22+
unicode-xid = {name = "unicode-xid", versions = ['0.2.1']}
23+
# some more of dtolnays crates
24+
anyhow = {name = "anyhow", versions = ['1.0.38']}
25+
async-trait = {name = "async-trait", versions = ['0.1.42']}
26+
cxx = {name = "cxx", versions = ['1.0.32']}
27+
ryu = {name = "ryu", versions = ['1.0.5']}
28+
serde_yaml = {name = "serde_yaml", versions = ['0.8.17']}
29+
thiserror = {name = "thiserror", versions = ['1.0.24']}
30+
# some embark crates, there are other interesting crates but
31+
# unfortunately adding them increases lintcheck runtime drastically
32+
cfg-expr = {name = "cfg-expr", versions = ['0.7.1']}
33+
puffin = {name = "puffin", git_url = "https://github.com/EmbarkStudios/puffin", git_hash = "02dd4a3"}
34+
rpmalloc = {name = "rpmalloc", versions = ['0.2.0']}
35+
tame-oidc = {name = "tame-oidc", versions = ['0.1.0']}
536

637
[recursive]
738
ignore = [

tests/ui-toml/excessive_nesting/excessive_nesting.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#![allow(clippy::no_effect)]
88
#![allow(clippy::unnecessary_operation)]
99
#![allow(clippy::never_loop)]
10+
#![allow(clippy::needless_if)]
1011
#![warn(clippy::excessive_nesting)]
1112
#![allow(clippy::collapsible_if)]
1213

tests/ui-toml/excessive_nesting/excessive_nesting.stderr

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: this block is too nested
2-
--> $DIR/excessive_nesting.rs:20:25
2+
--> $DIR/excessive_nesting.rs:21:25
33
|
44
LL | let w = { 3 };
55
| ^^^^^
@@ -8,7 +8,7 @@ LL | let w = { 3 };
88
= note: `-D clippy::excessive-nesting` implied by `-D warnings`
99

1010
error: this block is too nested
11-
--> $DIR/excessive_nesting.rs:66:17
11+
--> $DIR/excessive_nesting.rs:67:17
1212
|
1313
LL | / impl C {
1414
LL | | pub fn c() {}
@@ -18,15 +18,15 @@ LL | | }
1818
= help: try refactoring your code to minimize nesting
1919

2020
error: this block is too nested
21-
--> $DIR/excessive_nesting.rs:80:25
21+
--> $DIR/excessive_nesting.rs:81:25
2222
|
2323
LL | let x = { 1 }; // not a warning, but cc is
2424
| ^^^^^
2525
|
2626
= help: try refactoring your code to minimize nesting
2727

2828
error: this block is too nested
29-
--> $DIR/excessive_nesting.rs:97:17
29+
--> $DIR/excessive_nesting.rs:98:17
3030
|
3131
LL | / pub mod e {
3232
LL | | pub mod f {}
@@ -36,31 +36,31 @@ LL | | } // not here
3636
= help: try refactoring your code to minimize nesting
3737

3838
error: this block is too nested
39-
--> $DIR/excessive_nesting.rs:110:18
39+
--> $DIR/excessive_nesting.rs:111:18
4040
|
4141
LL | a_but_not({{{{{{{{0}}}}}}}});
4242
| ^^^^^^^^^^^
4343
|
4444
= help: try refactoring your code to minimize nesting
4545

4646
error: this block is too nested
47-
--> $DIR/excessive_nesting.rs:111:12
47+
--> $DIR/excessive_nesting.rs:112:12
4848
|
4949
LL | a.a({{{{{{{{{0}}}}}}}}});
5050
| ^^^^^^^^^^^^^
5151
|
5252
= help: try refactoring your code to minimize nesting
5353

5454
error: this block is too nested
55-
--> $DIR/excessive_nesting.rs:112:12
55+
--> $DIR/excessive_nesting.rs:113:12
5656
|
5757
LL | (0, {{{{{{{1}}}}}}});
5858
| ^^^^^^^^^
5959
|
6060
= help: try refactoring your code to minimize nesting
6161

6262
error: this block is too nested
63-
--> $DIR/excessive_nesting.rs:117:25
63+
--> $DIR/excessive_nesting.rs:118:25
6464
|
6565
LL | if true {
6666
| _________________________^
@@ -73,7 +73,7 @@ LL | | }
7373
= help: try refactoring your code to minimize nesting
7474

7575
error: this block is too nested
76-
--> $DIR/excessive_nesting.rs:129:29
76+
--> $DIR/excessive_nesting.rs:130:29
7777
|
7878
LL | let z = (|| {
7979
| _____________________________^
@@ -85,207 +85,207 @@ LL | | })();
8585
= help: try refactoring your code to minimize nesting
8686

8787
error: this block is too nested
88-
--> $DIR/excessive_nesting.rs:148:13
88+
--> $DIR/excessive_nesting.rs:149:13
8989
|
9090
LL | y += {{{{{5}}}}};
9191
| ^^^^^
9292
|
9393
= help: try refactoring your code to minimize nesting
9494

9595
error: this block is too nested
96-
--> $DIR/excessive_nesting.rs:149:20
96+
--> $DIR/excessive_nesting.rs:150:20
9797
|
9898
LL | let z = y + {{{{{{{{{5}}}}}}}}};
9999
| ^^^^^^^^^^^^^
100100
|
101101
= help: try refactoring your code to minimize nesting
102102

103103
error: this block is too nested
104-
--> $DIR/excessive_nesting.rs:150:12
104+
--> $DIR/excessive_nesting.rs:151:12
105105
|
106106
LL | [0, {{{{{{{{{{0}}}}}}}}}}];
107107
| ^^^^^^^^^^^^^^^
108108
|
109109
= help: try refactoring your code to minimize nesting
110110

111111
error: this block is too nested
112-
--> $DIR/excessive_nesting.rs:151:25
112+
--> $DIR/excessive_nesting.rs:152:25
113113
|
114114
LL | let mut xx = [0; {{{{{{{{100}}}}}}}}];
115115
| ^^^^^^^^^^^^^
116116
|
117117
= help: try refactoring your code to minimize nesting
118118

119119
error: this block is too nested
120-
--> $DIR/excessive_nesting.rs:152:11
120+
--> $DIR/excessive_nesting.rs:153:11
121121
|
122122
LL | xx[{{{{{{{{{{{{{{{{{{{{{{{{3}}}}}}}}}}}}}}}}}}}}}}}}];
123123
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124124
|
125125
= help: try refactoring your code to minimize nesting
126126

127127
error: this block is too nested
128-
--> $DIR/excessive_nesting.rs:153:13
128+
--> $DIR/excessive_nesting.rs:154:13
129129
|
130130
LL | &mut {{{{{{{{{{y}}}}}}}}}};
131131
| ^^^^^^^^^^^^^^^
132132
|
133133
= help: try refactoring your code to minimize nesting
134134

135135
error: this block is too nested
136-
--> $DIR/excessive_nesting.rs:155:17
136+
--> $DIR/excessive_nesting.rs:156:17
137137
|
138138
LL | for i in {{{{xx}}}} {{{{{{{{}}}}}}}}
139139
| ^^^^
140140
|
141141
= help: try refactoring your code to minimize nesting
142142

143143
error: this block is too nested
144-
--> $DIR/excessive_nesting.rs:155:28
144+
--> $DIR/excessive_nesting.rs:156:28
145145
|
146146
LL | for i in {{{{xx}}}} {{{{{{{{}}}}}}}}
147147
| ^^^^^^^^^^
148148
|
149149
= help: try refactoring your code to minimize nesting
150150

151151
error: this block is too nested
152-
--> $DIR/excessive_nesting.rs:157:28
152+
--> $DIR/excessive_nesting.rs:158:28
153153
|
154154
LL | while let Some(i) = {{{{{{Some(1)}}}}}} {{{{{{{}}}}}}}
155155
| ^^^^^^^^^^^^^
156156
|
157157
= help: try refactoring your code to minimize nesting
158158

159159
error: this block is too nested
160-
--> $DIR/excessive_nesting.rs:157:48
160+
--> $DIR/excessive_nesting.rs:158:48
161161
|
162162
LL | while let Some(i) = {{{{{{Some(1)}}}}}} {{{{{{{}}}}}}}
163163
| ^^^^^^^^
164164
|
165165
= help: try refactoring your code to minimize nesting
166166

167167
error: this block is too nested
168-
--> $DIR/excessive_nesting.rs:159:14
168+
--> $DIR/excessive_nesting.rs:160:14
169169
|
170170
LL | while {{{{{{{{true}}}}}}}} {{{{{{{{{}}}}}}}}}
171171
| ^^^^^^^^^^^^^^
172172
|
173173
= help: try refactoring your code to minimize nesting
174174

175175
error: this block is too nested
176-
--> $DIR/excessive_nesting.rs:159:35
176+
--> $DIR/excessive_nesting.rs:160:35
177177
|
178178
LL | while {{{{{{{{true}}}}}}}} {{{{{{{{{}}}}}}}}}
179179
| ^^^^^^^^^^^^
180180
|
181181
= help: try refactoring your code to minimize nesting
182182

183183
error: this block is too nested
184-
--> $DIR/excessive_nesting.rs:161:23
184+
--> $DIR/excessive_nesting.rs:162:23
185185
|
186186
LL | let d = D { d: {{{{{{{{{{{{{{{{{{{{{{{3}}}}}}}}}}}}}}}}}}}}}}} };
187187
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
188188
|
189189
= help: try refactoring your code to minimize nesting
190190

191191
error: this block is too nested
192-
--> $DIR/excessive_nesting.rs:163:8
192+
--> $DIR/excessive_nesting.rs:164:8
193193
|
194194
LL | {{{{1;}}}}..{{{{{{3}}}}}};
195195
| ^^^^
196196
|
197197
= help: try refactoring your code to minimize nesting
198198

199199
error: this block is too nested
200-
--> $DIR/excessive_nesting.rs:163:20
200+
--> $DIR/excessive_nesting.rs:164:20
201201
|
202202
LL | {{{{1;}}}}..{{{{{{3}}}}}};
203203
| ^^^^^^^
204204
|
205205
= help: try refactoring your code to minimize nesting
206206

207207
error: this block is too nested
208-
--> $DIR/excessive_nesting.rs:164:8
208+
--> $DIR/excessive_nesting.rs:165:8
209209
|
210210
LL | {{{{1;}}}}..={{{{{{{{{{{{{{{{{{{{{{{{{{6}}}}}}}}}}}}}}}}}}}}}}}}}};
211211
| ^^^^
212212
|
213213
= help: try refactoring your code to minimize nesting
214214

215215
error: this block is too nested
216-
--> $DIR/excessive_nesting.rs:164:21
216+
--> $DIR/excessive_nesting.rs:165:21
217217
|
218218
LL | {{{{1;}}}}..={{{{{{{{{{{{{{{{{{{{{{{{{{6}}}}}}}}}}}}}}}}}}}}}}}}}};
219219
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
220220
|
221221
= help: try refactoring your code to minimize nesting
222222

223223
error: this block is too nested
224-
--> $DIR/excessive_nesting.rs:165:10
224+
--> $DIR/excessive_nesting.rs:166:10
225225
|
226226
LL | ..{{{{{{{5}}}}}}};
227227
| ^^^^^^^^^
228228
|
229229
= help: try refactoring your code to minimize nesting
230230

231231
error: this block is too nested
232-
--> $DIR/excessive_nesting.rs:166:11
232+
--> $DIR/excessive_nesting.rs:167:11
233233
|
234234
LL | ..={{{{{3}}}}};
235235
| ^^^^^
236236
|
237237
= help: try refactoring your code to minimize nesting
238238

239239
error: this block is too nested
240-
--> $DIR/excessive_nesting.rs:167:8
240+
--> $DIR/excessive_nesting.rs:168:8
241241
|
242242
LL | {{{{{1;}}}}}..;
243243
| ^^^^^^
244244
|
245245
= help: try refactoring your code to minimize nesting
246246

247247
error: this block is too nested
248-
--> $DIR/excessive_nesting.rs:169:20
248+
--> $DIR/excessive_nesting.rs:170:20
249249
|
250250
LL | loop { break {{{{1}}}} };
251251
| ^^^^^
252252
|
253253
= help: try refactoring your code to minimize nesting
254254

255255
error: this block is too nested
256-
--> $DIR/excessive_nesting.rs:170:13
256+
--> $DIR/excessive_nesting.rs:171:13
257257
|
258258
LL | loop {{{{{{}}}}}}
259259
| ^^^^^^
260260
|
261261
= help: try refactoring your code to minimize nesting
262262

263263
error: this block is too nested
264-
--> $DIR/excessive_nesting.rs:172:14
264+
--> $DIR/excessive_nesting.rs:173:14
265265
|
266266
LL | match {{{{{{true}}}}}} {
267267
| ^^^^^^^^^^
268268
|
269269
= help: try refactoring your code to minimize nesting
270270

271271
error: this block is too nested
272-
--> $DIR/excessive_nesting.rs:173:20
272+
--> $DIR/excessive_nesting.rs:174:20
273273
|
274274
LL | true => {{{{}}}},
275275
| ^^
276276
|
277277
= help: try refactoring your code to minimize nesting
278278

279279
error: this block is too nested
280-
--> $DIR/excessive_nesting.rs:174:21
280+
--> $DIR/excessive_nesting.rs:175:21
281281
|
282282
LL | false => {{{{}}}},
283283
| ^^
284284
|
285285
= help: try refactoring your code to minimize nesting
286286

287287
error: this block is too nested
288-
--> $DIR/excessive_nesting.rs:180:17
288+
--> $DIR/excessive_nesting.rs:181:17
289289
|
290290
LL | / {
291291
LL | | println!("warning! :)");
@@ -295,15 +295,15 @@ LL | | }
295295
= help: try refactoring your code to minimize nesting
296296

297297
error: this block is too nested
298-
--> $DIR/excessive_nesting.rs:189:28
298+
--> $DIR/excessive_nesting.rs:190:28
299299
|
300300
LL | async fn c() -> u32 {{{{{{{0}}}}}}}
301301
| ^^^^^^^^^
302302
|
303303
= help: try refactoring your code to minimize nesting
304304

305305
error: this block is too nested
306-
--> $DIR/excessive_nesting.rs:195:8
306+
--> $DIR/excessive_nesting.rs:196:8
307307
|
308308
LL | {{{{b().await}}}};
309309
| ^^^^^^^^^^^

0 commit comments

Comments
 (0)