Skip to content

Custom plugin version is not actually supported #4654

@whs

Description

@whs

Welcome

Description of the problem

In https://golangci-lint.run/plugins/module-plugins/#reference the plugins.*.version field is documented, however the version field is actually unused:

image

Version of golangci-lint

$ golangci-lint --version
golangci-lint has version v1.57.2 built with go1.21.7 from (unknown, modified: ?, mod sum: "h1:NNhxfZyL5He1WWDrIvl1a4n5bvWZBcgAqBwlJAAgLTw=") on (unknown)

Configuration

version: v1.57.2
name: golangci-lint
destination: .bin

plugins:
  - module: internal
    import: internal
    version: v2.0.0

Go environment

$ go version && go env
go version go1.21.7 linux/amd64
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/whs/.cache/go-build'
GOENV='/home/whs/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/whs/go/pkg/mod'
GONOPROXY='<private>'
GONOSUMDB='<private>'
GOOS='linux'
GOPATH='/home/whs/go'
GOPRIVATE='<private>'
GOPROXY='<private>'
GOROOT='/nix/store/khpb8wx5dvf3bshb0iz9dm23z83r6niv-go-1.21.7/share/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/nix/store/khpb8wx5dvf3bshb0iz9dm23z83r6niv-go-1.21.7/share/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.7'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='<private>'
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 -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build90508159=/tmp/go-build -gno-record-gcc-switches'

Verbose output of running

N/A

A minimal reproducible example or link to a public repository

  1. Copy the config file above to .custom-gcl.yml and
  2. Point the custom plugin somewhere and refer to a version that is not @latest
  3. Run golangci-lint custom -v
  4. Observe that the resulting binary use the version @latest and not the pinned version

Validation

  • Yes, I've included all information above (version, config, etc.).

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinglinter: customAbout custom/private linters

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions