Skip to content

Commit ca2bd77

Browse files
BasavarajBankolliadonovan
authored andcommitted
analysisflags: quote analyzer name in enable usage
Update the help text for analyzer flags to quote the analyzer name (e.g., enable "any" analysis), avoiding ambiguity for analyzers such as "any". Fixes golang/go#77679 Change-Id: Iad7ccccba7a9616e2d0e3b9093fea8fcbc1c1bd9 Reviewed-on: https://go-review.googlesource.com/c/tools/+/748320 Reviewed-by: Madeline Kalil <mkalil@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> Commit-Queue: Alan Donovan <adonovan@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
1 parent 31904d1 commit ca2bd77

File tree

1 file changed

+1
-1
lines changed
  • go/analysis/internal/analysisflags

1 file changed

+1
-1
lines changed

go/analysis/internal/analysisflags/flags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func Parse(analyzers []*analysis.Analyzer, multi bool) []*analysis.Analyzer {
5252
prefix = a.Name + "."
5353

5454
enable := new(triState)
55-
enableUsage := "enable " + a.Name + " analysis"
55+
enableUsage := fmt.Sprintf("enable %q analysis", a.Name)
5656
flag.Var(enable, a.Name, enableUsage)
5757
enabled[a] = enable
5858
}

0 commit comments

Comments
 (0)