2

I'm trying to integrate golangci-lint with vscode. This is my settings file in vscode

  "go.lintTool": "golangci-lint",
  "go.lintFlags": ["--fast"],
  "go.liveErrors": {
    "enabled": true,
    "delay": 500
  },
  "go.lintOnSave": "workspace",
  "editor.codeActionsOnSave": {
    "source.organizeImports": true
  },
  "go.useLanguageServer": true,
  "go.languageServerExperimentalFeatures": {
    "diagnostics": true
  }

However none of the errors/warnings show up on vscode. Initially it was showing up but suddenly disappeared. Also on another note, I know the linting tool in turn use a number of other linters like errcheck ineffassign and so on, do I have to install them separately ?

tmp dev
  • 8,043
  • 16
  • 53
  • 108

1 Answers1

2

I had a similar problem and I solved it by removing --fast flag from the configuration, and rerunning linter via VS Code plugin, then adding it back.

I suspect it had something to do with the cache the --fast flag is using: https://golangci-lint.run/usage/faq/#why-running-with---fast-is-slow-on-the-first-run