Golangci-lint: Broken `version` and `--version` with v1.32.0

Created on 26 Oct 2020  路  10Comments  路  Source: golangci/golangci-lint

Thank you for creating the issue!

  • [x] Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
  • [x] Yes, I've searched similar issues on GitHub and didn't find any.
  • [x] Yes, I've included all information below (version, config, etc).

Please include the following information:

Version of golangci-lint

v1.32.0

Config file

None.

Go environment

None. (Docker)

Verbose output of running

v1.31.0:

$ docker run --rm golangci/golangci-lint:v1.31.0 golangci-lint version
golangci-lint has version 1.31.0 built from 3d6d0e7 on 2020-09-07T15:14:41Z

$ docker run --rm golangci/golangci-lint:v1.31.0 golangci-lint --version
golangci-lint has version 1.31.0 built from 3d6d0e7 on 2020-09-07T15:14:41Z

v1.32.0:

$ docker run --rm golangci/golangci-lint:v1.32.0 golangci-lint version
golangci-lint has version master built from ? on

$ docker run --rm golangci/golangci-lint:v1.32.0 golangci-lint --version
Error: unknown flag: --version
Usage:
  golangci-lint [flags]
  golangci-lint [command]

Available Commands:
  cache       Cache control and information
  completion  Output completion script
  config      Config
  help        Help
  linters     List current linters configuration
  run         Run this tool in cloud on every github pull request in https://golangci.com for free (public repos)
  version     Version

Flags:
      --color string              Use color when printing; can be 'always', 'auto', or 'never' (default "auto")
  -j, --concurrency int           Concurrency (default NumCPU) (default 8)
      --cpu-profile-path string   Path to CPU profile output file
  -h, --help                      help for golangci-lint
      --mem-profile-path string   Path to memory profile output file
      --trace-path string         Path to trace output file
  -v, --verbose                   verbose output

Use "golangci-lint [command] --help" for more information about a command.

failed executing command with error unknown flag: --version

I noticed that golangci-lint version and golangci-lint --version are broken with v1.32.0:

  • version outputs invalid text: golangci-lint has version master built from ? on
  • --version is handled as an unknown flag: Error: unknown flag: --version
bug docker help wanted

Most helpful comment

Version 1.32.1 was released just now, I have performed quick check, seems fixed now

$ docker run --rm golangci/golangci-lint:v1.32.1 golangci-lint --version
golangci-lint has version v1.32.1 built from dc2d6b51 on 2020-10-31T00:47:14Z

$ uname -a
Linux ubuntu20 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@ubuntu ~> docker run --rm golangci/golangci-lint:v1.32.1 golangci-lint --version
golangci-lint has version v1.32.1 built from dc2d6b51 on 2020-10-31T00:47:14Z
ubuntu@ubuntu ~> uname -a
Linux ubuntu 5.4.0-1022-raspi #25-Ubuntu SMP PREEMPT Thu Oct 15 13:31:49 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux

All 10 comments

Hey, thank you for opening your first Issue ! 馃檪 If you would like to contribute we have a guide for contributors.

@ybiquitous thanks for reporting this one, seems like something is broken due to recent refactor docker build for multi-arch support. Do you plan to work on this?

I can take a look sometimes in weekend only.

@sayboras Sorry, I'm not familiar with the Go language... 馃檱

Sorry, I'm not familiar with the Go language...

no worry, and thanks again for reporting this :)

Same error here from golangci/golangci-lint:latest docker image ^^
golangci-lint has version master built from ? on

@nvuillam thanks, latest tag is pointing to v1.32.0, hence it will face the same issue.

I got sometime today, so just send the fix. It's pending for review, and might take sometimes.

Thank you so much for the quick fix! 馃槉

Version 1.32.1 was released just now, I have performed quick check, seems fixed now

$ docker run --rm golangci/golangci-lint:v1.32.1 golangci-lint --version
golangci-lint has version v1.32.1 built from dc2d6b51 on 2020-10-31T00:47:14Z

$ uname -a
Linux ubuntu20 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@ubuntu ~> docker run --rm golangci/golangci-lint:v1.32.1 golangci-lint --version
golangci-lint has version v1.32.1 built from dc2d6b51 on 2020-10-31T00:47:14Z
ubuntu@ubuntu ~> uname -a
Linux ubuntu 5.4.0-1022-raspi #25-Ubuntu SMP PREEMPT Thu Oct 15 13:31:49 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux

It works for me too, thanks :)

It works for me. Thank you so much! 馃槉

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lnshi picture lnshi  路  4Comments

anuaimi picture anuaimi  路  4Comments

simonpasquier picture simonpasquier  路  4Comments

KeepMasterBranch picture KeepMasterBranch  路  3Comments

DarthHater picture DarthHater  路  4Comments