Skip to content

cmd/go: go vet should take vet's flags #19350

Closed
@robpike

Description

@robpike

Currently the docs for cmd/go say (and the code agrees):

To run the vet tool with specific options, run 'go tool vet'.

This means that the careful argument construction that the go tool does, which takes into effect things like cgo, cannot be applied easily if one wants a special vet flag.

I propose to fix go vet to be more like go test, passing vet's own flags through. This will require a little code copying but shouldn't be too hard.

This change would make it easier to roll out experimental, opt-in flags for vet, which is my main motivation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions