You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Partial formatting: re-indent statements outside the range to match the formatted output #182
google-java-format#1503 (merged 2026-10-29, copybara export) addresses --lines / --offset formatting: when an edit adds or removes a block nesting level, statements outside the requested range kept their old indentation and ended up misaligned with their closing braces. With --cleanup on, every unformatted statement-level segment that starts on its own line is now shifted as a unit to its formatted indentation, keeping its inner line breaks. Text blocks and other multi-line tokens are untouched, and a check ensures only leading whitespace changes. A separate upstream commit (f7eeb776a343a4e1d65d1ce229c837773257e276) also fixes leftover double blank lines after removing an unused import in partial mode (see google-java-format#1436 and google-java-format#598, both closed 2026-10-29).
Why it matters: IDE users format only the changed lines, which is exactly this case. We should check whether our range formatting leaves the same misalignment and the same double blank line after unused-import removal.
Suggested action: investigate. Try both scenarios in our formatter; adopt the idea only if the problem reproduces. Examples: not available - the exact test inputs are in a 700-line test diff and I did not derive our output.
Filed from an upstream-watch ticket after manual review.
Activity