tmthrgd / go-bindata

A small utility which generates Go code from any file. Useful for embedding binary data in a Go program. [Obsolete].
https://golang.org/issue/35950
Other
72 stars 4 forks source link

Can't run staticcheck #5

Closed ryboe closed 7 years ago

ryboe commented 7 years ago
go get -u honnef.co/go/tools/cmd/staticcheck
staticcheck $(go list ./... | grep -v /vendor/)
/Users/ryan/go/src/github.com/tmthrgd/go-bindata/main_test.go:13:2: could not import github.com/pmezard/go-difflib/difflib (cannot find package "github.com/pmezard/go-difflib/difflib" in any of:
    /Users/ryan/go/src/github.com/tmthrgd/go-bindata/vendor/github.com/pmezard/go-difflib/difflib (vendor tree)
    /usr/local/Cellar/go/1.8.1/libexec/src/github.com/pmezard/go-difflib/difflib (from $GOROOT)
    /Users/ryan/go/src/github.com/pmezard/go-difflib/difflib (from $GOPATH))
/Users/ryan/go/src/github.com/tmthrgd/go-bindata/testdata_test.go:17:15: could not import github.com/tmthrgd/go-rand (cannot find package "github.com/tmthrgd/go-rand" in any of:
    /Users/ryan/go/src/github.com/tmthrgd/go-bindata/vendor/github.com/tmthrgd/go-rand (vendor tree)
    /usr/local/Cellar/go/1.8.1/libexec/src/github.com/tmthrgd/go-rand (from $GOROOT)
    /Users/ryan/go/src/github.com/tmthrgd/go-rand (from $GOPATH))
/Users/ryan/go/src/github.com/tmthrgd/go-bindata/testdata_test.go:18:2: could not import github.com/zach-klippenstein/goregen (cannot find package "github.com/zach-klippenstein/goregen" in any of:
    /Users/ryan/go/src/github.com/tmthrgd/go-bindata/vendor/github.com/zach-klippenstein/goregen (vendor tree)
    /usr/local/Cellar/go/1.8.1/libexec/src/github.com/zach-klippenstein/goregen (from $GOROOT)
    /Users/ryan/go/src/github.com/zach-klippenstein/goregen (from $GOPATH))
/Users/ryan/go/src/github.com/tmthrgd/go-bindata/testdata_test.go:35:8: undeclared name: chacha20rand
/Users/ryan/go/src/github.com/tmthrgd/go-bindata/main_test.go:29:12: undeclared name: difflib
/Users/ryan/go/src/github.com/tmthrgd/go-bindata/main_test.go:29:44: undeclared name: difflib
/Users/ryan/go/src/github.com/tmthrgd/go-bindata/testdata_test.go:49:12: undeclared name: chacha20rand
/Users/ryan/go/src/github.com/tmthrgd/go-bindata/testdata_test.go:71:13: undeclared name: regen
/Users/ryan/go/src/github.com/tmthrgd/go-bindata/testdata_test.go:71:75: undeclared name: regen
/Users/ryan/go/src/github.com/tmthrgd/go-bindata/testdata_test.go:87:14: undeclared name: regen
/Users/ryan/go/src/github.com/tmthrgd/go-bindata/testdata_test.go:87:41: undeclared name: regen
2017/04/10 20:17:56 couldn't load packages due to errors: github.com/tmthrgd/go-bindata
tmthrgd commented 7 years ago

Could you please run go get -u -t github.com/tmthrgd/go-bindata and try again. They all seem to be missing dependency errors because go get does not fetch packages required for tests by default.

ryboe commented 7 years ago

It passes! Sorry for the noise! I do have one question, though. Will travis automatically fetch the test deps too? If so, I can add staticcheck to #6, and maybe some other code checkers too.

tmthrgd commented 7 years ago

I thought it would. You can see in the travis log that it's running go get -t .... It wouldn't be much of a CI tool if it couldn't run the tests properly. 😅

Feel free to add staticcheck to #6 and other meaningful code checkers. Don't be afraid to push multiple commits to that pull request. I'd rather have them really granular than monolithic. So if you do add staticcheck or any others, do that in a new commit for each tool. I can rebase or mess around with it afterwards if I feel the need.

Don't worry about the noise, it's great to see you're interested. I pulled more late nighters than was remotely sensible working on this. 😂