Commit b3280ef
committed
review(round2): dedup foreign-region pairs and name override in errors
Two adversarial-review fixes for the foreign-regions feature:
- EffectiveForeignRegions now dedups identical marker pairs. A pair
declared both top-level and on a matching override (or repeated in a
list) previously produced duplicate protected ranges and duplicate
MDS073 diagnostics, because the check path (Run) only dedups
diagnostics when a repo-scoped rule is enabled and MDS073 is not one.
The linear scan keeps the common no-region path allocation-free.
- checkForeignRegionList takes a location label so a malformed marker
pair on an override reports overrides[i].foreign-regions[j] instead
of an ambiguous top-level foreign-regions[j].
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EwKxDxhjkTQPPkBrNhsrNG1 parent 162105b commit b3280ef
2 files changed
Lines changed: 80 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
24 | | - | |
25 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
26 | 35 | | |
27 | 36 | | |
28 | 37 | | |
29 | 38 | | |
30 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
31 | 56 | | |
32 | 57 | | |
33 | 58 | | |
| |||
44 | 69 | | |
45 | 70 | | |
46 | 71 | | |
47 | | - | |
| 72 | + | |
48 | 73 | | |
49 | 74 | | |
50 | 75 | | |
51 | | - | |
| 76 | + | |
| 77 | + | |
52 | 78 | | |
53 | 79 | | |
54 | 80 | | |
55 | 81 | | |
56 | 82 | | |
57 | 83 | | |
58 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
59 | 89 | | |
60 | 90 | | |
61 | 91 | | |
62 | 92 | | |
63 | | - | |
| 93 | + | |
64 | 94 | | |
65 | 95 | | |
66 | | - | |
| 96 | + | |
67 | 97 | | |
68 | 98 | | |
69 | 99 | | |
70 | | - | |
71 | | - | |
| 100 | + | |
| 101 | + | |
72 | 102 | | |
73 | 103 | | |
74 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
55 | 95 | | |
56 | 96 | | |
57 | 97 | | |
| |||
0 commit comments