Closed
Description
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. (https://golangci-lint.run/usage/linters/)
Description of the problem
Upgrading golangci-lint in VS Code by running Go: Install/Update Tools
throws the error saying there is not enough arguments in call to "github.com/mgechev/revive/lint".New
function.
It says the issue is in pkg/golinters/revive.go:68:22 line and I think it was caused by the change in revive v1.1.3 mgechev/revive#628 that added a maxOpenFiles
argument to the New
function (link to the commit where this was added).
I've attached the output of VS Code below.
Version of golangci-lint
$ golangci-lint --version
golangci-lint has version v1.43.0 built from (unknown, mod sum: "h1:SLwZFEmDgopqZpfP495zCtV9REUf551JJlJ51Ql7NZA=") on (unknown)
Configuration file
/
Go environment
/
Verbose output of running
Tools environment: GOPATH=/home/marko/work/go, GOBIN=/home/marko/work/go/bin
Installing 1 tool at the configured GOBIN: /home/marko/work/go/bin in module mode.
golangci-lint
Installing github.com/golangci/golangci-lint/cmd/golangci-lint@latest FAILED
{
"killed": false,
"code": 2,
"signal": null,
"cmd": "/usr/bin/go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest",
"stdout": "",
"stderr": "github.com/golangci/golangci-lint/pkg/golinters\n# github.com/golangci/golangci-lint/pkg/golinters\nwork/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/revive.go:68:22: not enough arguments in call to \"github.com/mgechev/revive/lint\".New\n\thave (func(string) ([]byte, error))\n\twant (\"github.com/mgechev/revive/lint\".ReadFile, int)\n"
}
1 tools failed to install.
golangci-lint: failed to install golangci-lint(github.com/golangci/golangci-lint/cmd/golangci-lint@latest): Error: Command failed: /usr/bin/go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest
github.com/golangci/golangci-lint/pkg/golinters
# github.com/golangci/golangci-lint/pkg/golinters
work/go/pkg/mod/github.com/golangci/[email protected]/pkg/golinters/revive.go:68:22: not enough arguments in call to "github.com/mgechev/revive/lint".New
have (func(string) ([]byte, error))
want ("github.com/mgechev/revive/lint".ReadFile, int)
Code example or link to a public repository
/
Metadata
Metadata
Assignees
Labels
No labels