Skip to content

Generating bash completions with --no-descriptions does not work #3567

Closed
@scop

Description

@scop

Welcome

  • Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, config, etc.).
  • Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.). (https://golangci-lint.run/usage/linters/)

Description of the problem

golangci-lint seems to be doing something with flags that makes cobra's built in bash completion generator --no-descriptions to break.

$ golangci-lint completion bash --help | grep -- --no-descriptions
      --no-descriptions   disable completion descriptions
$ golangci-lint completion bash --no-descriptions
ERRO Can't get config for command line: can't parse args: unknown flag: --no-descriptions 

Version of golangci-lint

$ golangci-lint version
golangci-lint has version 1.51.1 built from b87d2c19 on 2023-02-05T13:06:33Z

Configuration file

$ cat .golangci.yml
# not relevant

Go environment

$ go version && go env
# not relevant

Verbose output of running

$ golangci-lint cache clean
$ golangci-lint run -v
# not relevant

Code example or link to a public repository

// N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: CLIRelated to CLIbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions