Please answer these questions before submitting your issue. Thanks!
What version of Go, VS Code & VS Code Go extension are you using?
- Run
go version to get version of Go
go version go1.15.5 darwin/amd64
- Run
gopls -v version to get version of Gopls if you are using the language server.
Build info
----------
golang.org/x/tools/gopls v0.5.3
golang.org/x/tools/gopls@v0.5.3 h1:C8QSrqjqaVzlVoHL1R9yWbROoOApRgI8gN1G+cHlPuw=
github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/google/go-cmp@v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
golang.org/x/mod@v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
golang.org/x/sync@v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=
golang.org/x/tools@v0.0.0-20201110032815-ae45d7cf37a9 h1:S0ATUNSw92bO7f5Z+1tSQsq48TdQs2Ye2rTGJdtf5qc=
golang.org/x/xerrors@v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
honnef.co/go/tools@v0.0.1-2020.1.6 h1:W18jzjh8mfPez+AwGLxmOImucz/IFjpNlrKVnaj2YVc=
mvdan.cc/gofumpt@v0.0.0-20200927160801-5bfeb2e70dd6 h1:z+/YqapuV7VZPvBb3GYmuEJbA88M3PFUxaHilHYVCpQ=
mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=
- Run
code -v or code-insiders -v to get version of VS Code or VS Code Insiders
1.51.1
e5a624b788d92b8d34d1392e4c4d9789406efe8f
x64
- Check your installed extensions to get the version of the VS Code Go extension
- Run
go env to get the go development environment details
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/nuruddin.ashr/Library/Caches/go-build"
GOENV="/Users/nuruddin.ashr/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/nuruddin.ashr/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/nuruddin.ashr/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.15.5/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.15.5/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/yc/cb3vzbts51jd4_r408dnm8kc0000gr/T/go-build486617498=/tmp/go-build -gno-record-gcc-switches -fno-common"
Share the Go related settings you have added/edited
Run Preferences: Open Settings (JSON) command to open your settings.json file.
Share all the settings with the go. or ["go"] or gopls prefixes.
{
"go.formatTool": "goimports",
"go.useLanguageServer": true,
"go.lintTool": "golangci-lint",
"go.testTags": "integration",
"gopls.env": {
"GOFLAGS": "-tags=integration"
}
}
Describe the bug
Given this test file
package foo_test
import "testing"
func TestFoo(t *testing.T) {
t.Error("Oops")
t.Run("Nested", func(t *testing.T) {
t.Error("oops")
})
}
The output would be
Running tool: /usr/local/bin/go test -timeout 30s -coverprofile=/var/folders/yc/cb3vzbts51jd4_r408dnm8kc0000gr/T/vscode-goWInLIX/go-code-cover -tags integration github.com/uudashr/foo
--- FAIL: TestFoo (0.00s)
/Users/me/Projects/foo/foo_test.go:6: Oops
--- FAIL: TestFoo/Nested (0.00s)
foo_test.go:9: oops
FAIL
coverage: [no statements]
FAIL github.com/uudashr/foo 0.021s
FAIL
The output of foo_test.go:9 is not expanded, so it's not clickable. While the foo_test.go:6 properly expanded.
Expect to also expand the foo_test.go:9, would be something like:
--- FAIL: TestFoo (0.00s)
/Users/me/Projects/foo/foo_test.go:6: Oops
--- FAIL: TestFoo/Nested (0.00s)
/Users/me/Projects/foo/foo_test.go:9: oops
FAIL
coverage: [no statements]
FAIL github.com/uudashr/foo 0.021s
FAIL
Steps to reproduce the behavior:
- Use the source code provided above
- Run the test
Go: Test Package
- You can see the
foo_test.go:9 is not expanded
Please answer these questions before submitting your issue. Thanks!
What version of Go, VS Code & VS Code Go extension are you using?
go versionto get version of Gogo version go1.15.5 darwin/amd64gopls -v versionto get version of Gopls if you are using the language server.code -vorcode-insiders -vto get version of VS Code or VS Code Insiders0.18.1go envto get the go development environment detailsShare the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)command to open your settings.json file.Share all the settings with the
go.or["go"]orgoplsprefixes.{ "go.formatTool": "goimports", "go.useLanguageServer": true, "go.lintTool": "golangci-lint", "go.testTags": "integration", "gopls.env": { "GOFLAGS": "-tags=integration" } }Describe the bug
Given this test file
The output would be
The output of
foo_test.go:9is not expanded, so it's not clickable. While thefoo_test.go:6properly expanded.Expect to also expand the
foo_test.go:9, would be something like:Steps to reproduce the behavior:
Go: Test Packagefoo_test.go:9is not expanded