aws / amazon-ecs-init

ecs-init is now part of the amazon-ecs-agent repo https://github.com/aws/amazon-ecs-agent/tree/master/ecs-init
https://github.com/aws/amazon-ecs-agent
Apache License 2.0
200 stars 117 forks source link

add go vet to makefile #275

Closed fierlion closed 4 years ago

fierlion commented 4 years ago

Summary

We should have go vet integrated into the build process. It should be a make target. We should also fix all the errors that are currently surfaced by go vet. See log snippet below.

Supporting Log Snippets

running go vet ./... yields a few suggestions:

# github.com/aws/amazon-ecs-init/BUILD/ecs-init-1.33.0/ecs-init/docker [github.com/aws/amazon-ecs-init/BUILD/ecs-init-1.33.0/ecs-init/docker.test]
BUILD/ecs-init-1.33.0/ecs-init/docker/docker_unspecified.go:48:3: cannot use logConfig (type "github.com/aws/amazon-ecs-init/ecs-init/vendor/github.com/fsouza/go-dockerclient".LogConfig) as type "github.com/aws/amazon-ecs-init/BUILD/ecs-init-1.33.0/ecs-init/vendor/github.com/fsouza/go-dockerclient".LogConfig in field value
# github.com/aws/amazon-ecs-init/BUILD/ecs-init-1.33.0/ecs-init/engine [github.com/aws/amazon-ecs-init/BUILD/ecs-init-1.33.0/ecs-init/engine.test]
BUILD/ecs-init-1.33.0/ecs-init/engine/engine_test.go:166:41: cannot use mockCtrl (type *"github.com/aws/amazon-ecs-init/BUILD/ecs-init-1.33.0/ecs-init/vendor/github.com/golang/mock/gomock".Controller) as type *"github.com/aws/amazon-ecs-init/ecs-init/vendor/github.com/golang/mock/gomock".Controller in argument to gpu.NewMockGPUManager
BUILD/ecs-init-1.33.0/ecs-init/engine/engine_test.go:200:41: cannot use mockCtrl (type *"github.com/aws/amazon-ecs-init/BUILD/ecs-init-1.33.0/ecs-init/vendor/github.com/golang/mock/gomock".Controller) as type *"github.com/aws/amazon-ecs-init/ecs-init/vendor/github.com/golang/mock/gomock".Controller in argument to gpu.NewMockGPUManager
# github.com/aws/amazon-ecs-init/ecs-init/engine
ecs-init/engine/engine.go:219: unreachable code
fierlion commented 4 years ago

https://github.com/aws/amazon-ecs-init/pull/276