Skip to content

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Apr 28, 2025

TL;DR

Fixed a false positive in the curly eslint rule when running on windows (CRLF line endings)

What changed?

since \r\n is two chars, get_next_char_offset was (incorrectly) returning a new line at the start of the string. Now, it checks for the \r\n pattern, to determine how many chars to skip (1 or 2)

fixes #9600

Copy link
Contributor Author

camc314 commented Apr 28, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@camc314 camc314 marked this pull request as ready for review April 28, 2025 14:46
@camc314 camc314 changed the title fix(linter): false positive in curly on windows fix(linter): false positive in eslint/curly on windows Apr 28, 2025
@github-actions github-actions bot added the A-linter Area - Linter label Apr 28, 2025
@camc314 camc314 force-pushed the c/04-28-fix_linter_false_positive_in_curly_on_windows branch from 789929a to 1cb8568 Compare April 28, 2025 14:47
@github-actions github-actions bot added the C-bug Category - Bug label Apr 28, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Apr 28, 2025

CodSpeed Instrumentation Performance Report

Merging #10671 will not alter performance

Comparing c/04-28-fix_linter_false_positive_in_curly_on_windows (c89da93) with main (4861a62)

Summary

✅ 36 untouched benchmarks

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Apr 28, 2025
Copy link
Member

Boshen commented Apr 28, 2025

Merge activity

### TL;DR

Fixed a false positive in the `curly` eslint rule when running on windows (`CRLF` line endings)

### What changed?

since `\r\n` is two chars, `get_next_char_offset` was (incorrectly) returning a new line at the start of the string. Now, it checks for the `\r\n` pattern, to determine how many chars to skip (1 or 2)

fixes #9600
@graphite-app graphite-app bot force-pushed the c/04-28-fix_linter_false_positive_in_curly_on_windows branch from 1cb8568 to c89da93 Compare April 28, 2025 16:51
@graphite-app graphite-app bot merged commit c89da93 into main Apr 28, 2025
25 checks passed
@graphite-app graphite-app bot deleted the c/04-28-fix_linter_false_positive_in_curly_on_windows branch April 28, 2025 16:56
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linter: curly set to multi-line triggers false positive on single line else

3 participants