Change information
Commit message:
go/analysis/passes/modernize: stringsbuilder: avoid overlapping fixes
This CL causes stringsbuilder to offer at most one fix overlapping
a given point (ignoring import edits).
This fixes the immediate problem of conflicts in stringsbuilder (#76983)
but is only a partial mitigation of the more general problem of
textually non-conflicting edits that nonetheless conflict either
syntactically (as in this case) or semantically (as happens when,
say, the composition of two fixes renders a local variable unused),
which is golang/go#76476.
+ test
Fixes golang/go#76983
Updates golang/go#76476
Change-Id: I2251a88580319dfac2841c22daee56b1c4936990
Files:
- M go/analysis/passes/modernize/stringsbuilder.go
- M go/analysis/passes/modernize/testdata/src/stringsbuilder/stringsbuilder.go
- M go/analysis/passes/modernize/testdata/src/stringsbuilder/stringsbuilder.go.golden
Change size: M
Delta: 3 files changed, 86 insertions(+), 1 deletion(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +2 by Madeline Kalil
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI