Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: improve output for subcommands with no flags #43447

Open
ainar-g opened this issue Dec 31, 2020 · 4 comments
Open

x/tools/gopls: improve output for subcommands with no flags #43447

ainar-g opened this issue Dec 31, 2020 · 4 comments

Comments

@ainar-g
Copy link
Contributor

@ainar-g ainar-g commented Dec 31, 2020

Currently (golang/tools@6375436), the output of gopls check -h looks like this:

show diagnostic results for the specified file

Usage: check [flags] <filename>

Example: show the diagnostic results of this file:

  $ gopls check internal/lsp/cmd/check.go

	gopls check flags are:

That is, no flags are documented. If gopls check actually has flags, they should probably be documented, and if not, the output should probably not mention them at all.

@rentziass
Copy link
Contributor

@rentziass rentziass commented Oct 9, 2021

I believe this was fixed by golang.org/cl/284215?

@ainar-g
Copy link
Contributor Author

@ainar-g ainar-g commented Oct 11, 2021

@rentziass, I've checked gopls from master, and the message is better, but there is still the [flags] in there:

$ gopls check -h
  show diagnostic results for the specified file

  Usage: check [flags] <filename>

  Example: show the diagnostic results of this file:

    $ gopls check internal/lsp/cmd/check.go

Ironically, the -h flag, which I used to get this message, isn't documented in the message itself.

@rentziass
Copy link
Contributor

@rentziass rentziass commented Oct 11, 2021

I see, that probably doesn't come from the commands themselves but something higher up. Let me have a look.

@gopherbot
Copy link

@gopherbot gopherbot commented Oct 22, 2021

Change https://golang.org/cl/357994 mentions this issue: internal/tool: remove [flags] when not necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants