Repository navigation
Commit 6530142
fix(doc-links): report references into a moved directory as missing (DeusData#2588)
A Markdown reference whose directory no longer exists counted as no
reference to the repository: no MENTIONS edge and no unresolved row. After
`git mv src/util src/helpers`, `src/util/rounding.py::clamp` simply
disappeared, so a moved or renamed directory left no trace of the stale
reference.
The doc-rot rule required the path's own parent directory to be a Folder.
It now also accepts any directory above it that the reference itself wrote:
`src` for `src/util/rounding.py` read from the root, or for
`../src/util/rounding.py` read from docs/. The directory a try is read from
(the document's directory, or what its leading `./` and `../` reach) does
not count, so a document's own directory never turns a foreign path into
doc rot. A path none of whose written directories exists (a file a tutorial
asks the reader to create in a new directory, a system path) stays no
reference, as before.
Test (tests/test_doc_links_md.c) indexes a document that references
src/util/rounding.py both from the root and relatively, moves src/util to
src/helpers, and re-indexes incrementally, requiring the same state as a
full index. Without the fix it fails on the defect: the reference has no
row ("" != "missing").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Scott Beck <296871+bline@users.noreply.github.com>1 parent 0ca6e7d commit 6530142
2 files changed
Lines changed: 94 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
408 | 410 | | |
409 | 411 | | |
410 | 412 | | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
411 | 432 | | |
412 | 433 | | |
413 | 434 | | |
| |||
1126 | 1147 | | |
1127 | 1148 | | |
1128 | 1149 | | |
| 1150 | + | |
1129 | 1151 | | |
1130 | 1152 | | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
1131 | 1163 | | |
1132 | 1164 | | |
1133 | 1165 | | |
| |||
1137 | 1169 | | |
1138 | 1170 | | |
1139 | 1171 | | |
1140 | | - | |
| 1172 | + | |
1141 | 1173 | | |
1142 | 1174 | | |
1143 | 1175 | | |
| |||
1174 | 1206 | | |
1175 | 1207 | | |
1176 | 1208 | | |
1177 | | - | |
| 1209 | + | |
| 1210 | + | |
1178 | 1211 | | |
1179 | 1212 | | |
1180 | 1213 | | |
| |||
1185 | 1218 | | |
1186 | 1219 | | |
1187 | 1220 | | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
1188 | 1225 | | |
1189 | 1226 | | |
1190 | 1227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
447 | 496 | | |
448 | 497 | | |
449 | 498 | | |
| |||
866 | 915 | | |
867 | 916 | | |
868 | 917 | | |
| 918 | + | |
869 | 919 | | |
870 | 920 | | |
871 | 921 | | |
| |||
0 commit comments