From b19be0fa71558b3bd27dd4210d9eee35fd52db91 Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Tue, 21 Nov 2023 15:40:52 -0500 Subject: [PATCH] gopls/internal/cmd/help_test.go: document Change-Id: Ia1d242e67fe36d5042891ee2db69a01b092d6b84 Reviewed-on: https://go-review.googlesource.com/c/tools/+/544256 Auto-Submit: Alan Donovan Reviewed-by: Robert Findley LUCI-TryBot-Result: Go LUCI --- gopls/internal/cmd/help_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gopls/internal/cmd/help_test.go b/gopls/internal/cmd/help_test.go index 692f3d06fa3..5c11cd5163d 100644 --- a/gopls/internal/cmd/help_test.go +++ b/gopls/internal/cmd/help_test.go @@ -4,6 +4,14 @@ package cmd_test +// This file defines tests to ensure the cmd/usage/*.hlp files match +// the output of the tool. The .hlp files are not actually needed by +// the executable (they are not //go:embed-ded, say), but they make it +// easier to review changes to the gopls command's help logic since +// any effects are manifest as changes to these files. + +//go:generate go test -run Help -update-help-files + import ( "bytes" "context" @@ -18,8 +26,6 @@ import ( "golang.org/x/tools/internal/tool" ) -//go:generate go test -run Help -update-help-files - var updateHelpFiles = flag.Bool("update-help-files", false, "Write out the help files instead of checking them") const appName = "gopls"