Repository navigation
Commit 8442cb1
committed
fix(surface): keep regex findings off physical line numbers
The comment refinement read content_lines (split on physical \n) for
findings whose line numbers come from logical_line_starts, which also
breaks on vertical tab, form feed, file/group/record separators, NEL and the
Unicode line/paragraph separators. On a file carrying one of those extra
separators the two coordinate systems disagree, so the refinement indexed a
neighbouring line -- e.g. a curl ... | sh hit immediately before a
# done line was reported with the comments surface, and the same
mismatch reached the EA3 license filter and PE3 docs triage.
Restore content_lines to content.splitlines() (its pre-PR behaviour)
and skip the refinement whenever the source contains one of those separators,
rather than picking one coordinate system for both. AST-derived findings keep
working because the two systems only disagree on exactly those files.
Adds a regression test beside the existing AST one.
Signed-off-by: Harbor404 <[email protected]>1 parent c93028c commit 8442cb1
2 files changed
Lines changed: 56 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
490 | 490 | | |
491 | 491 | | |
492 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
493 | 500 | | |
494 | 501 | | |
495 | 502 | | |
| |||
964 | 971 | | |
965 | 972 | | |
966 | 973 | | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
967 | 997 | | |
968 | 998 | | |
969 | 999 | | |
970 | 1000 | | |
971 | 1001 | | |
972 | | - | |
973 | | - | |
974 | | - | |
975 | | - | |
976 | | - | |
977 | | - | |
978 | | - | |
979 | | - | |
980 | | - | |
981 | | - | |
982 | | - | |
983 | | - | |
984 | | - | |
985 | | - | |
986 | | - | |
987 | | - | |
988 | | - | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
989 | 1005 | | |
990 | 1006 | | |
991 | 1007 | | |
| |||
1006 | 1022 | | |
1007 | 1023 | | |
1008 | 1024 | | |
1009 | | - | |
| 1025 | + | |
1010 | 1026 | | |
1011 | 1027 | | |
1012 | 1028 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
| |||
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
142 | 164 | | |
143 | 165 | | |
144 | 166 | | |
| |||
0 commit comments