fix(formatter): preserve comment for statement terminators and binary casts - #26213
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
Oxfmt Ecosystem CI
💥 = panic, |
Merging this PR will not alter performance
Comparing Footnotes
|
Merge activity
|
… casts (#26213) Refine comment position preserving rules, for statements and binary casts. Fixes idempotency issues for several sites. --- Trailing is the same-line run only. A newline-preceded comment is never trailing. It defers to the next node's leading pass, staying own-line with its blank lines. Comments around `as`/`satisfies` keep their source side and line-start side, within the grammar-defined slots (line terminator is not allowed between `as` and before).
cfef465 to
1213e12
Compare

Refine comment position preserving rules, for statements and binary casts. Fixes idempotency issues for several sites.
Trailing is the same-line run only.
A newline-preceded comment is never trailing. It defers to the next node's leading pass, staying own-line with its blank lines.
Comments around
as/satisfieskeep their source side and line-start side, within the grammar-defined slots (line terminator is not allowed betweenasand before).