Commit a04a7cd
committed
Auto merge of #7779 - rust-lang:test_module, r=flip1995
make test module detection more strict
I started with some small improvements to clippy_utils/src/lib.rs, but then found that our "test" module detection would also catch words containing "test" like e.g. "attestation". So I made this a bit more strict (splitting by `'_'` and checking for `test` or `tests`), adding a test case as I went.
---
*Please write a short comment explaining your change (or "none" for internal only changes)*
changelog: noneFile tree
4 files changed
+39
-27
lines changed- clippy_utils/src
- tests/ui
4 files changed
+39
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
| 254 | + | |
259 | 255 | | |
260 | 256 | | |
261 | 257 | | |
| |||
1285 | 1281 | | |
1286 | 1282 | | |
1287 | 1283 | | |
1288 | | - | |
1289 | | - | |
1290 | | - | |
| 1284 | + | |
1291 | 1285 | | |
| 1286 | + | |
1292 | 1287 | | |
1293 | 1288 | | |
1294 | 1289 | | |
| |||
1315 | 1310 | | |
1316 | 1311 | | |
1317 | 1312 | | |
1318 | | - | |
| 1313 | + | |
1319 | 1314 | | |
1320 | 1315 | | |
1321 | 1316 | | |
| |||
1338 | 1333 | | |
1339 | 1334 | | |
1340 | 1335 | | |
1341 | | - | |
1342 | | - | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
1343 | 1339 | | |
1344 | 1340 | | |
1345 | 1341 | | |
1346 | | - | |
1347 | | - | |
| 1342 | + | |
1348 | 1343 | | |
1349 | 1344 | | |
1350 | 1345 | | |
| |||
1467 | 1462 | | |
1468 | 1463 | | |
1469 | 1464 | | |
1470 | | - | |
1471 | | - | |
1472 | | - | |
1473 | | - | |
1474 | | - | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
1475 | 1468 | | |
1476 | 1469 | | |
1477 | 1470 | | |
| |||
2063 | 2056 | | |
2064 | 2057 | | |
2065 | 2058 | | |
2066 | | - | |
2067 | | - | |
2068 | | - | |
2069 | | - | |
2070 | | - | |
2071 | | - | |
2072 | | - | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
2073 | 2062 | | |
2074 | 2063 | | |
| 2064 | + | |
2075 | 2065 | | |
2076 | 2066 | | |
2077 | 2067 | | |
| |||
2083 | 2073 | | |
2084 | 2074 | | |
2085 | 2075 | | |
2086 | | - | |
| 2076 | + | |
2087 | 2077 | | |
2088 | 2078 | | |
2089 | 2079 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
233 | 241 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
234 | 242 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
126 | 132 | | |
0 commit comments