Commit 458555d
authored
Rollup merge of rust-lang#101809 - aDotInTheVoid:jsondoclint, r=GuillaumeGomez
Replace `check_missing_items.py` with `jsondoclint`
[zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/check_missing_items.2Epy.20Replacement.2E)
check_missing_items.py was a python script that checked rustdoc json output to make sure all the Id's referenced existed in the JSON index. This PR replaces that with a rust binary (`jsondoclint`) that does the same thing.
### Motivation
1. Easier to change when `rustdoc-json-types` changes, as `jsondoclint` uses the types directly.
2. Better Errors:
- Multiple Errors can be emited for a single crate
- Errors can say where in JSON they occored
```
2:2889:408 not in index or paths, but refered to at '.index."2:2888:104".inner.items[0]'
2:2890:410 not in index or paths, but refered to at '.index."2:2888:104".inner.items[1]'
```
3. Catches more bugs.
- Because matches are exaustive, all posible variants considered for enums
- All Id's checked
- Has already found rust-lang#101770, rust-lang#101199 and rust-lang#100973
- Id type is also checked, so the Id's in a structs fields can only be field items.
4. Allows the possibility of running from `rustdoc::json`, which we should do in a crator run at some point.
cc ``@CraftSpider``
r? ``@GuillaumeGomez``File tree
15 files changed
+816
-214
lines changed- src
- bootstrap
- etc
- test/rustdoc-json/type
- tools
- compiletest/src
- jsondoclint
- src
15 files changed
+816
-214
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
1362 | 1362 | | |
1363 | 1363 | | |
1364 | 1364 | | |
1365 | | - | |
| 1365 | + | |
1366 | 1366 | | |
1367 | | - | |
| 1367 | + | |
1368 | 1368 | | |
1369 | 1369 | | |
1370 | 1370 | | |
| |||
1891 | 1891 | | |
1892 | 1892 | | |
1893 | 1893 | | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
1894 | 1904 | | |
1895 | 1905 | | |
1896 | 1906 | | |
| |||
4445 | 4455 | | |
4446 | 4456 | | |
4447 | 4457 | | |
4448 | | - | |
| 4458 | + | |
4449 | 4459 | | |
4450 | | - | |
| 4460 | + | |
4451 | 4461 | | |
4452 | 4462 | | |
4453 | 4463 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1341 | 1341 | | |
1342 | 1342 | | |
1343 | 1343 | | |
| 1344 | + | |
| 1345 | + | |
1344 | 1346 | | |
1345 | 1347 | | |
1346 | 1348 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
379 | 380 | | |
380 | 381 | | |
381 | 382 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
226 | 227 | | |
227 | 228 | | |
228 | 229 | | |
| 230 | + | |
229 | 231 | | |
230 | 232 | | |
231 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2563 | 2563 | | |
2564 | 2564 | | |
2565 | 2565 | | |
| 2566 | + | |
2566 | 2567 | | |
2567 | | - | |
2568 | | - | |
2569 | | - | |
| 2568 | + | |
2570 | 2569 | | |
2571 | 2570 | | |
2572 | 2571 | | |
2573 | | - | |
| 2572 | + | |
2574 | 2573 | | |
2575 | 2574 | | |
2576 | 2575 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments