Skip to content

Run unused-import removal, modifier reordering, and import sorting as a single pre-formatting pipeline. - #1488

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_1000701065
Oct 20, 2026
Merged

copybara-service[bot] merged 1 commit into
masterfrom
test_1000701065

Conversation

@copybara-service

Copy link
Copy Markdown

Run unused-import removal, modifier reordering, and import sorting as a single pre-formatting pipeline.

Consolidate unused-import removal, modifier reordering, and import sorting into a unified Cleanups pass that runs before core layout. Unused imports are removed and imports are sorted before formatting. When no non-whitespace pass modifies the input, the parsed compilation unit is reused directly during formatting.

RELNOTES=Formatter.getFormatReplacements is now strictly whitespace-only and no longer reorders modifiers; use Formatter.formatSource(String, Collection<Range<Integer>>) to format character ranges with modifier reordering (or JavaFormatterOptions.builder().reorderModifiers(false) to disable modifier reordering).

… a single pre-formatting pipeline.

Consolidate unused-import removal, modifier reordering, and import sorting into a unified Cleanups pass that runs before core layout. Unused imports are removed and imports are sorted before formatting. When no non-whitespace pass modifies the input, the parsed compilation unit is reused directly during formatting.

RELNOTES=`Formatter.getFormatReplacements` is now strictly whitespace-only and no longer reorders modifiers; use `Formatter.formatSource(String, Collection<Range<Integer>>)` to format character ranges with modifier reordering (or `JavaFormatterOptions.builder().reorderModifiers(false)` to disable modifier reordering).
PiperOrigin-RevId: 1002946984
@copybara-service
copybara-service Bot merged commit 633ce6b into master Oct 20, 2026
4 checks passed
@copybara-service
copybara-service Bot deleted the test_1000701065 branch October 20, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant