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
go/analysis/passes/modernize: stditerators: better name heuristic
This change causes stditerators' name heuristic to choose the
name v from a function body of this form:
for i := 0; i < x.Len(); i++ {
if v := x.At(i); cond { ... }
}
The fix may result in the degenerate
for v := range x.All() {
if v := v; cond { ... }
}
so the forvar analyzer has been taught to recognise this
pattern too (see parent CL).
Updates golang/go#76240
Updates golang/go#76241
Change-Id: I8888fea5adce3e5f55002abadd16527f877e3389
Reviewed-on: https://go-review.googlesource.com/c/tools/+/719361
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
0 commit comments