-
Notifications
You must be signed in to change notification settings - Fork 10
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
Issue with go vet
false positives
#8
Comments
I have not done Arcanist for a while, so I'm not sure how to fix it. It's logical that it operates on the package rather than the file itself. The question is: Can Arcanist pass in a directory containing the file to lint instead of the file itself? If so, this should be an easy fix. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It appears there's a settle difference between
go vet
andgo tool vet
-go tool vet
can resolve variables that may have been declared in a different file, whereasgo vet
won't.go vet
appears to have the intention of being executed on a package level, not a file level.Here's a simple example - I have a variable defined in
a.go
that I use inb.go
. Runninggo vet
onb.go
results in an "undefined" error, but runninggo vet
on the package is perfectly fine:I don't have a great workaround for Go 1.12 yet (maybe lint the package but try to avoid re-linting the package by keeping track of what files have been checked? And only show vet errors for the changed files?). Perhaps in the meantime we can have a patch that if Go is < 1.12, continue to use
go tool vet
.Thoughts @kalbasit ?
Related links:
golang/go#23916
dense-analysis/ale#1358
The text was updated successfully, but these errors were encountered: