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: reported typecheck errors not sorted by file position #26236

Open
rsc opened this issue Jul 5, 2018 · 0 comments
Open

cmd/vet: reported typecheck errors not sorted by file position #26236

rsc opened this issue Jul 5, 2018 · 0 comments
Labels
Analysis Issues related to static analysis (vet, x/tools/go/analysis) NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Jul 5, 2018

Compare gc and vet typecheck errors:

$ go test
# golang.org/x/vgo2/vendor/cmd/go/internal/modfetch [golang.org/x/vgo2/vendor/cmd/go/internal/modfetch.test]
./coderepo.go:279:70: undefined: file2
./coderepo.go:294:8: no new variables on left side of :=
./coderepo.go:294:30: undefined: gomod
# golang.org/x/vgo2/vendor/cmd/go/internal/modfetch
./coderepo.go:294:30: undeclared name: gomod
./coderepo.go:294:8: no new variables on left side of :=
./coderepo.go:279:70: undeclared name: file2
vet: typecheck failures

(go test printing both sets at all is a different issue, but it is nice for seeing how they compare.)

It's weird that the errors from vet come out not sorted in file line order. They should.

@rsc rsc added this to the Go1.12 milestone Jul 5, 2018
@odeke-em odeke-em self-assigned this Jul 7, 2018
@FiloSottile FiloSottile added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jul 19, 2018
@ianlancetaylor ianlancetaylor modified the milestones: Go1.12, Go1.13 Dec 11, 2018
@andybons andybons modified the milestones: Go1.13, Go1.14 Jul 8, 2019
@rsc rsc modified the milestones: Go1.14, Backlog Oct 9, 2019
@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) NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

6 participants