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: check for useless assignments to struct fields #8402

Open
josharian opened this issue Jul 21, 2014 · 0 comments
Open

cmd/vet: check for useless assignments to struct fields #8402

josharian opened this issue Jul 21, 2014 · 0 comments
Labels
Analysis Issues related to static analysis (vet, x/tools/go/analysis)
Milestone

Comments

@josharian
Copy link
Contributor

Implement this TODO from the assignment checker:

// TODO: should also check for assignments to struct fields inside methods
// that are on T instead of *T. 

Discussion at https://groups.google.com/forum/#!topic/golang-nuts/rSTE4G75QQU/discussion.

This might also be extended to range loops -- see http://play.golang.org/p/FMsMT0dnhf,
linked from issue #8356.
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title go.tools/cmd/vet: check for useless assignments to struct fields x/tools/cmd/vet: check for useless assignments to struct fields Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-tools label Apr 14, 2015
@mvdan mvdan changed the title x/tools/cmd/vet: check for useless assignments to struct fields cmd/vet: check for useless assignments to struct fields May 31, 2018
@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)
Projects
None yet
Development

No branches or pull requests

3 participants