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

"go.vetFlags" fails to vet code in 0.6.62 #1073

Closed
seanpfeifer opened this issue Jul 10, 2017 · 3 comments
Closed

"go.vetFlags" fails to vet code in 0.6.62 #1073

seanpfeifer opened this issue Jul 10, 2017 · 3 comments

Comments

@seanpfeifer
Copy link

The change in #1023 (released in 0.6.62) to use "go vet" instead of "go tool vet" has broken the ability to use "go.vetFlags".

"go vet" fails silently in the Output tab (and not code is actually vetted) if "go.vetFlags" are defined as per the example for the flag:
"go.vetFlags": ["-all", "-shadow"]

Per the "go vet" command:
To run the vet tool with specific options, run 'go tool vet'.

@seanpfeifer seanpfeifer changed the title "go.vetFlags" fails to vet code in 0.6.62 by PR #1023 "go.vetFlags" fails to vet code in 0.6.62 Jul 10, 2017
@seanpfeifer
Copy link
Author

seanpfeifer commented Jul 10, 2017

Test case

package main

import "fmt"

func main() {
	fmt.Printf("%s")
}

Assign a value to "go.vetFlags", such as:
"go.vetFlags": ["-all", "-shadow"]

Expected

missing argument for Printf("%s"): format reads arg 1, have only 0 args

Actual

No vet information reported.

@ramya-rao-a
Copy link
Contributor

Thanks for catching this @seanpfeifer!

Fixed and also added a unit test so that the tests can catch it if broken again.

Fix will be out in the next update

@ramya-rao-a
Copy link
Contributor

The fix is now out in the latest update (0.6.63) to the Go extension

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

No branches or pull requests

2 participants