1

I'm working on a shared Go repo. The repo includes a committed executable for golangci-lint, so that we can all run the same exact version of the linter on local machines and on CI.

I'm also using the vsCode Go extension. I can configure it to use golangci-lint as a linter, but I have not found a way to specify a version. Because the committed version of the executable is 1.56.0 and vsCode installs the latest (1.59.0), the output I get in vsCode is inconsistent with CI and everyone else.

Is there a way to configure the vsCode Go extension so it points to a specific path for golangci-lint?

1 Answer 1

0

You could use go.toolsGopath to configure Go tools per workspace.

Sign up to request clarification or add additional context in comments.

2 Comments

The problem is that I need to do this specifically for the linter, not for all tools.
Use symbolic links for the other tools then.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.