Commit 601a036
Fix Vale false positives on context lines in PR diffs (#181)
* Update Vale sticky comment behavior
Keep the Vale PR comment stable by updating it in place and skipping no-op updates when the rendered report is unchanged.
Co-authored-by: OpenAI GPT-5.5 <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* Fix Vale false positives on context lines in PR diffs
The line-range filter was extracting hunk headers (@@ -x,y +a,b @@) and
treating the entire hunk span as "modified." Context lines within a hunk
(e.g. mapped_pages at line 3 when only a description was added at line 2)
were wrongly flagged.
Fix: walk the full patch per-file and record only actual '+' lines, one
entry per added line. Change the Python filter to exclusive upper bound
(start <= line < end) so a count=1 entry for line N matches exactly N.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: OpenAI GPT-5.5 <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent b1d0893 commit 601a036
2 files changed
Lines changed: 20 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
528 | 534 | | |
529 | 535 | | |
530 | 536 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
0 commit comments