golang / vscode-go

Go extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=golang.Go
Other
3.78k stars 727 forks source link

multi-root workspace scoped variables are not expanded in `go.alternateTools` #3407

Closed stan-stately closed 1 month ago

stan-stately commented 1 month ago

What version of Go, VS Code & VS Code Go extension are you using?

Version Information
* Run `go version` to get version of Go from _the VS Code integrated terminal_. - `go version go1.22.3 darwin/arm64` * Run `gopls -v version` to get version of Gopls from _the VS Code integrated terminal_. - `golang.org/x/tools/gopls v0.15.3` * Run `code -v` or `code-insiders -v` to get version of VS Code or VS Code Insiders. - `1.89.1 dc96b837cf6bb4af9cd736aa3af08cf8279f7685 arm64` * Check your installed extensions to get the version of the VS Code Go extension - `v0.41.4` * Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > `Go: Locate Configured Go Tools` command. - N/A

Share the Go related settings you have added/edited

{
  "folders": [
     {
       "name": "root",
       "path": ".",
      },
    ]
...
  "go.formatTool": "custom",
   "go.alternateTools": {
     "customFormatter": "${workspaceFolder:root}/bin/golangci-lint",
    },

Describe the bug

Steps to reproduce the behavior:

  1. Create a vscode workspace
  2. Set the workspace settings from above
  3. Save a golang file to trigger the formatter

Screenshots or recordings

stan-stately commented 1 month ago

I think this is a duplicate of https://github.com/golang/vscode-go/issues/2582. Seems to be fixed in nightly extension