Repository navigation
Commit 260cba3
committed
fix(link): report parent spans against parent_source, not self.source_id
#450 added `ValidationContext::parent_source` because a referenced definition's
body is validated under its own source, so a parent node's range can live in a
different file than `self.source_id`. The child-admissibility, child-under-leaf,
and negated-required-field diagnostics still reported their parent `related_to`
span against `self.source_id` — correct only because those checks are always
rooted at the current node's own context (co-located), but inconsistent with
`emit_field_not_on_node` and the documented convention. Thread `parent_source`
through and report against it. Behavior-preserving single-file (snapshots
unchanged); correct under cross-file references.1 parent 7b7c8c1 commit 260cba3
1 file changed
Lines changed: 8 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
| 437 | + | |
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
| |||
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
| 585 | + | |
585 | 586 | | |
586 | 587 | | |
587 | 588 | | |
| |||
600 | 601 | | |
601 | 602 | | |
602 | 603 | | |
| 604 | + | |
603 | 605 | | |
604 | 606 | | |
605 | 607 | | |
| |||
611 | 613 | | |
612 | 614 | | |
613 | 615 | | |
| 616 | + | |
614 | 617 | | |
615 | 618 | | |
616 | 619 | | |
| |||
886 | 889 | | |
887 | 890 | | |
888 | 891 | | |
| 892 | + | |
889 | 893 | | |
890 | 894 | | |
891 | 895 | | |
| |||
902 | 906 | | |
903 | 907 | | |
904 | 908 | | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
909 | | - | |
| 909 | + | |
910 | 910 | | |
911 | 911 | | |
912 | 912 | | |
| |||
917 | 917 | | |
918 | 918 | | |
919 | 919 | | |
| 920 | + | |
920 | 921 | | |
921 | 922 | | |
922 | 923 | | |
| |||
927 | 928 | | |
928 | 929 | | |
929 | 930 | | |
930 | | - | |
| 931 | + | |
931 | 932 | | |
932 | 933 | | |
933 | 934 | | |
| |||
0 commit comments