refactor(formatter): remove SortImportsTransform abstraction#22075
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. |
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
Pull request overview
Refactors the formatter’s import-sorting IR transform by removing the now-redundant SortImportsTransform wrapper and moving its transform method to a standalone function, reducing indentation and simplifying call sites.
Changes:
- Replace
SortImportsTransform::transform(...)with a freetransform(...)function. - Remove the
SortImportsTransformstruct/impl wrapper and flatten indentation accordingly.
81c2f78 to
d71939d
Compare
b7045ab to
f539758
Compare
801f277 to
51ec2d4
Compare
d71939d to
79aa43d
Compare
Merge activity
|
Pure refactor. After #22065, `SortImportsTransform` serves no purpose. Convert its only method `transform` to a free function. No substantive changes - the PR purely makes that one change and removes a level of indentation. Only exception is fixing a typo in 1 comment ("fush" -> "flush").
51ec2d4 to
5de13ff
Compare
79aa43d to
b036558
Compare

Pure refactor. After #22065,
SortImportsTransformserves no purpose. Convert its only methodtransformto a free function.No substantive changes - the PR purely makes that one change and removes a level of indentation. Only exception is fixing a typo in 1 comment ("fush" -> "flush").