Commit daae490
committed
fix(lint): clamp negative offsets in ColumnOfOffset
The binary-search rewrite only clamped the upper bound (offset >
len(Source)); a negative offset now echoed back out unclamped
(ColumnOfOffset(-5) == -4) instead of the pre-refactor behavior of
always returning 1 for any negative offset. No shipped rule call site
can currently trigger this (all pass an already-guarded, non-negative
value), but the contract should still match LineOfOffset's and the
prior implementation's handling of out-of-domain input.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCh2j2oeSw6UgNsmpjRonL1 parent 1aba2d9 commit daae490
2 files changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
557 | 560 | | |
558 | 561 | | |
559 | 562 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
283 | 291 | | |
284 | 292 | | |
285 | 293 | | |
| |||
0 commit comments