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

Installing using install.sh causes inconsistent version tag #3789

Closed
4 tasks done
jiayinzhang-mint opened this issue Apr 20, 2023 · 1 comment
Closed
4 tasks done
Labels
area: install Issue relates to installation or downloading process won't fix This will not be worked on

Comments

@jiayinzhang-mint
Copy link

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

Suppose I install golangci-lint v1.51.1 via brew, go install, etc., I can get the following result for running golangci-lint version --format short:v1.51.1.

However, if I install golangci-lint using the install.sh and runs the same command, I would get 1.51.1, which is inconsistent with the results of other approaches. This behavior can potentially cause issues within CI/CD process (like a version checking mechanism).

Version of golangci-lint

``` v1.51.1 ```

Configuration file

```console run: timeout: 10m go: "1.19" skip-dirs: - proto output: format: colored-line-number print-issued-lines: true print-linter-name: true linters: disable-all: true enable: - bodyclose - depguard - dogsled - gocritic - gofmt - goimports - goprintffuncname - gosimple # https://github.com//issues/357 - staticcheck - unused - stylecheck - govet - ineffassign - misspell - nakedret - typecheck - unconvert - whitespace - prealloc - predeclared - revive - asciicheck - errcheck - gci - gofumpt - gosec - contextcheck - exportloopref linters-settings: stylecheck: checks: ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022"] initialisms: [ "HTTP", "HTTPS", "ID", "IP", "IPv4", "IPv6", "UID", "UUID", "URL", "VM", "TLS", ] errcheck: check-type-assertions: true check-blank: false goimports: local-prefixes: gitlab.eng.vmware.com/devtools/vts/vts-api prealloc: simple: true range-loops: true for-loops: false gci: sections: - standard # Standard section: captures all standard packages. - default # Default section: contains all imports that could not be matched to another section type. - prefix(gitlab.eng.vmware.com/devtools/vts/vts-api) # Custom section: groups all imports with the specified Prefix. - blank # Blank section: contains all blank imports. This section is not present unless explicitly enabled. - dot # Dot section: contains all dot imports. This section is not present unless explicitly enabled. skip-generated: true custom-order: true gofumpt: module-path: gitlab.eng.vmware.com/devtools/vts/vts-api extra-rules: true misspell: locale: US ignore-words: - vts - nimbus revive: enable-all-rules: true rules: - name: blank-imports disabled: true - name: max-public-structs disabled: true - name: file-header disabled: true - name: banned-characters disabled: true - name: function-result-limit disabled: true - name: cognitive-complexity disabled: true - name: var-naming disabled: true # replaced with stylecheck - name: add-constant disabled: true - name: flag-parameter disabled: true - name: nested-structs disabled: true - name: argument-limit arguments: [5] - name: function-length arguments: [180, 0] # (int,int) the maximum allowed statements and lines. Must be non-negative integers. Set to 0 to disable the check - name: cyclomatic arguments: [12] - name: line-length-limit arguments: [200] - name: exported severity: warning issues: max-issues-per-linter: 0 max-same-issues: 0 include: # EXC0012 revive: exported (.+) should have comment( \(or a comment on this block\))? or be unexported - EXC0012 # EXC0014 revive: comment on exported (.+) should be of the form "(.+)..." - EXC0014 exclude: # SA1029 staticcheck: should not use built-in type string as key for value; define your own type to avoid collisions - SA1029 ```

Go environment

go version go1.20.3 darwin/arm64
GO111MODULE="on"
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/mint/Library/Caches/go-build"
GOENV="/Users/mint/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/mint/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/mint/go"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/opt/homebrew/Cellar/go/1.20.3/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/homebrew/Cellar/go/1.20.3/libexec/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.20.3"
GCCGO="gccgo"
AR="ar"
CC="cc"
CXX="c++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/y7/2d67pvs11251qvntn66f8m4r0000gn/T/go-build3700927787=/tmp/go-build -gno-record-gcc-switches -fno-common"

Verbose output of running

# install with go install
$ golangci-lint version --format short
$ v1.51.1

# install with install.sh
$ golangci-lint version --format short
$ 1.51.1

Code example or link to a public repository

-
@jiayinzhang-mint jiayinzhang-mint added the bug Something isn't working label Apr 20, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Apr 20, 2023

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

@ldez ldez added question Further information is requested area: install Issue relates to installation or downloading process won't fix This will not be worked on and removed bug Something isn't working question Further information is requested labels Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: install Issue relates to installation or downloading process won't fix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants