Skip to content

cmd/vet: add unkeyed field literal check to 'go test' set #31695

Open
@rsc

Description

#2794 proposes requiring keyed (tagged) literals for any imported struct.
go vet has a test for this already.
But the test is only on in go vet not the automatic vet during go test.
I suggest we enable it during go test at the start of the Go 1.14 cycle
as an experiment. If it works well there then maybe it would make sense
to promote the restriction to the language itself. And if not, then not.
Or maybe vet alone will be enough. Time will tell.

/cc @robpike @ianlancetaylor @griesemer

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    AnalysisIssues related to static analysis (vet, x/tools/go/analysis)NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.early-in-cycleA change that should be done early in the 3 month dev cycle.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions