favadi / flycheck-gometalinter

Flycheck checker for gometalinter
BSD 2-Clause "Simplified" License
57 stars 8 forks source link

cannot find vendor packages #3

Closed slidemonk closed 7 years ago

slidemonk commented 7 years ago

When I run gometalinter . directly there are no such errors. Also go build can compile the code just fine. However, when I have this flycheck mode enabled in emacs, I get following errors:

could not import google.golang.org/grpc (cannot find package "google.golang.org/grpc" in any of: (interfacer)

unused global variable could not import google.golang.org/grpc (cannot find package "google.golang.org/grpc" in any of: (varcheck)

could not import google.golang.org/grpc (cannot find package "google.golang.org/grpc" in any of: (unconvert)

unused struct field could not import google.golang.org/grpc (cannot find package "google.golang.org/grpc" in any of: (structcheck)

error return value not checked (could not import google.golang.org/grpc (cannot find package "google.golang.org/grpc" in any of:) (errcheck)

could not import google.golang.org/grpc (cannot find package "google.golang.org/grpc" in any of: (aligncheck)

I even tried running tools like interfacer (reported in above errors) directly and it doesn't give out any errors either. So, I'm surprised why this flycheck mode is showing messages as if tools like interfacer could not find packages in vendor dir?

nitingupta910 commented 7 years ago

My $GOPATH/src was a symlink which was probably confusing emacs lisp side of scripting (since running various go tools directly from CLI always worked). I copied over the src folder to GOPATH and now it's all working. Thanks.