Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rsc opened this issue Apr 26, 2019 · 1 comment
Open

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

rsc opened this issue Apr 26, 2019 · 1 comment
Labels
Analysis Issues related to static analysis (vet, x/tools/go/analysis) early-in-cycle A change that should be done early in the 3 month dev cycle. NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Apr 26, 2019

#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

@rsc rsc added this to the Go1.14 milestone Apr 26, 2019
@rsc rsc self-assigned this Apr 26, 2019
@rsc rsc added the early-in-cycle A change that should be done early in the 3 month dev cycle. label Apr 26, 2019
@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
@cristaloleg
Copy link

Looks like this can be done in Go 1.15 cycle.

@rsc rsc removed their assignment Jun 23, 2022
@cagedmantis cagedmantis added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Jun 23, 2022
@adonovan adonovan added the Analysis Issues related to static analysis (vet, x/tools/go/analysis) label Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Analysis Issues related to static analysis (vet, x/tools/go/analysis) early-in-cycle A change that should be done early in the 3 month dev cycle. NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

4 participants