[tools] go/analysis/passes/modernize: disable BLoop analyzer

0 views
Skip to first unread message

Alan Donovan (Gerrit)

unread,
Dec 22, 2025, 10:01:45 PM (13 hours ago) Dec 22
to Madeline Kalil, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, golang-co...@googlegroups.com

Alan Donovan submitted the change

Change information

Commit message:
go/analysis/passes/modernize: disable BLoop analyzer

When b.N is used to benchmark very small workloads,
the suggestion to use b.Loop may result in an increased
overhead that skews benchmark results. Since we cannot
accurately identify such workloads, we unfortunately
should just disable the b.Loop modernizer in the "go
fix" suite.

We leave the modernize enabled in gopls because
it is interactive and programmers will scrutinize
the edits.

Fixes golang/go#74967
Change-Id: I011a167feb865fee6a61cf611aeecb70b285f255
Commit-Queue: Alan Donovan <adon...@google.com>
Reviewed-by: Alan Donovan <adon...@google.com>
Auto-Submit: Alan Donovan <adon...@google.com>
Files:
  • M go/analysis/passes/modernize/doc.go
  • M go/analysis/passes/modernize/modernize.go
  • M gopls/doc/analyzers.md
  • M gopls/internal/doc/api.json
Change size: S
Delta: 4 files changed, 6 insertions(+), 4 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Alan Donovan
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: tools
Gerrit-Branch: master
Gerrit-Change-Id: I011a167feb865fee6a61cf611aeecb70b285f255
Gerrit-Change-Number: 731962
Gerrit-PatchSet: 5
Gerrit-Owner: Madeline Kalil <mka...@google.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Reviewer: Madeline Kalil <mka...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages