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

GoLint keeps installing golangci-lint binary #440

Open
wandering-tales opened this issue Mar 13, 2024 · 2 comments
Open

GoLint keeps installing golangci-lint binary #440

wandering-tales opened this issue Mar 13, 2024 · 2 comments

Comments

@wandering-tales
Copy link

Whenever I run the GoLint command in my devcontainer the golangci-lint binary is being installed. The problem is that, even though the installation seems successful

install github.com/golangci/golangci-lint/cmd/golangci-lint@latest finished

the next time I run GoLint the installation is repeated.

By running checkhealth command I see in the go.nvim checks that the golangci-lint tool is always missing.

The only workaround so far is manually installing the tool from within the container:

curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.56.2
@ray-x
Copy link
Owner

ray-x commented Mar 31, 2024

What happens if you run go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest ?
Likely, the tools are not properly installed.
Alternatively, you can install golangci-lint with tools like brew apt install to your PATH
As the plugin will use os.executable('golangci-lint') to check if the tool is properly installed.

@wandering-tales
Copy link
Author

What happens if you run go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest ? Likely, the tools are not properly installed. Alternatively, you can install golangci-lint with tools like brew apt install to your PATH As the plugin will use os.executable('golangci-lint') to check if the tool is properly installed.

I think the issue is not about the check itself, but rather the way this plugin tries to install golangci-lint, which I ignore. For instance, when I install golangci-lint by any other means (e.g. go install, mason, golangci-lint install script, etc.), the command GoLint works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants