Closed sharanyad closed 4 years ago
addresses https://github.com/aws/amazon-ecs-init/issues/298 also fixes existing goimports errors
adds gocyclo, goimports and govet target to travis mostly reused from https://github.com/aws/amazon-ecs-agent/blob/master/Makefile
$ make static-check # Run gocyclo over all .go files gocyclo -over 15 /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/ecs-init.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/backoff/backoff.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/cache/cache.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/cache/dependencies.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/cache/dependencies_mocks.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/cmd/cmd.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/config/common.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/config/config_unspecified.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/config/logger.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/config/release.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/docker/backoff_mocks.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/docker/dependencies.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/docker/dependencies_mocks.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/docker/dependencies_unspecified.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/docker/docker.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/docker/docker_unspecified.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/engine/dependencies.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/engine/dependencies_mocks.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/engine/engine.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/exec/exec.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/exec/iptables/cmd_mocks.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/exec/iptables/exec_mocks.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/exec/iptables/iptables.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/exec/sysctl/cmd_mocks.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/exec/sysctl/exec_mocks.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/exec/sysctl/sysctl.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/gpu/nvidia_gpu_manager.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/gpu/nvidia_gpu_manager_mocks.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/version/formatting.go /home/ec2-user/go/src/github.com/aws/amazon-ecs-init/ecs-init/version/version.go go vet github.com/aws/amazon-ecs-init/ecs-init github.com/aws/amazon-ecs-init/ecs-init/backoff github.com/aws/amazon-ecs-init/ecs-init/cache github.com/aws/amazon-ecs-init/ecs-init/cmd github.com/aws/amazon-ecs-init/ecs-init/config github.com/aws/amazon-ecs-init/ecs-init/docker github.com/aws/amazon-ecs-init/ecs-init/engine github.com/aws/amazon-ecs-init/ecs-init/exec github.com/aws/amazon-ecs-init/ecs-init/exec/iptables github.com/aws/amazon-ecs-init/ecs-init/exec/sysctl github.com/aws/amazon-ecs-init/ecs-init/gpu github.com/aws/amazon-ecs-init/ecs-init/version
New tests cover the changes:
This contribution is under the terms of the Apache 2.0 License:
travis caught it! "The command "make static-test" exited with 2."
Summary
addresses https://github.com/aws/amazon-ecs-init/issues/298 also fixes existing goimports errors
Implementation details
adds gocyclo, goimports and govet target to travis mostly reused from https://github.com/aws/amazon-ecs-agent/blob/master/Makefile
Testing
New tests cover the changes:
Description for the changelog
Licensing
This contribution is under the terms of the Apache 2.0 License: