Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

go vet is not passed go.buildTags #1591

Closed
FiloSottile opened this issue Mar 25, 2018 · 2 comments
Closed

go vet is not passed go.buildTags #1591

FiloSottile opened this issue Mar 25, 2018 · 2 comments

Comments

@FiloSottile
Copy link
Contributor

I have a file with a build tag of json1, and workspace settings of

{
    "go.buildTags": "json1"
}

cause vet to report issues everywhere the symbols from that file are not found, while

{
    "go.buildTags": "json1",
    "go.vetFlags": ["-tags", "json1"]
}

works fine. The same issue seems not to be there with lintFlags.

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Apr 3, 2018

Thanks for reporting. Looks like we miss passing the build tags to when vetting, this should be an easy fix.
PRs are welcome.

Place where go vet is called: https://github.com/Microsoft/vscode-go/blob/0.6.78/src/goVet.ts#L57
Reference to how build tags are passed to go build: https://github.com/Microsoft/vscode-go/blob/0.6.78/src/goBuild.ts#L71

@ramya-rao-a
Copy link
Contributor

Thanks to @novak, this bug is now fixed in the latest update to the Go extension (0.6.79)

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants