Skip to content

go.vetFlags doesn't work #219

Closed
Closed
@Lachee

Description

@Lachee

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

  • Run go version to get version of Go
    • go version go1.14.4 windows/amd64
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    • 1.46.0 a5d1cc28bb5da32ec67e86cc50f84c67cc690321 x64
  • Check your installed extensions to get the version of the VS Code Go extension
    • v0.14.4
  • Run go env to get the go development environment details
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\lachl\AppData\Local\go-build
set GOENV=D:\Users\Lachee\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\lachl\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=D:\ccache-src\links\gcc.exe
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\lachl\AppData\Local\Temp\go-build254906210=/tmp/go-build -gno-record-gcc-switches

Share the Go related settings you have added/edited

{
    "go.toolsEnvVars": {
        "GOOS": "js",
        "GOARCH": "wasm"
    },
    "go.vetFlags": [
        "-composites=false",
    ]
}

Describe the bug

go.vetFlags are ignored and composites do not get disabled. They are still visible in the Problems tab and highlighted in code (see screenshot). When manually running go vet -composites=false, not warnings are generated. Setting the vet to off doesn't work either.

I expect this setting to be respected by the vet and to disable the composite warning, removing it from the Problems tab.

Steps to reproduce the behavior:

  1. Clone https://github.com/lachee/noodle
  2. Open the cloned folder as a new workspace
  3. Open examples/app_nineslice.go
  4. See "composite literal uses unkeyed fields" warning littered everywhere.
  5. Update settings.json to include the -composites=false flag
  6. Note the warnings do not disappear, even after reset.
  7. Update settings.json to disable vet.
  8. Note the warnings do not disappear, even after reset.

Screenshots or recordings

screenshot of bug
(https://i.lu.je/2020/Code_4pFdoBX88A.png)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions