From 52440a473201d5e8391f301b1161f2f80265a14b Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Tue, 28 Apr 2020 10:47:03 +0200 Subject: [PATCH] Setup Github Action for CI close #1 Signed-off-by: Nicolas De Loof --- ecs/Makefile | 5 ++++- ecs/golangci.yaml | 12 ++++++++++++ ecs/pkg/amazon/ecs.go | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 ecs/golangci.yaml diff --git a/ecs/Makefile b/ecs/Makefile index d8cc4a504..6ff9437d7 100644 --- a/ecs/Makefile +++ b/ecs/Makefile @@ -7,4 +7,7 @@ test: ## Run tests dev: build ln -f -s "${PWD}/dist/docker-ecs" "${HOME}/.docker/cli-plugins/docker-ecs" -.PHONY: build test dev \ No newline at end of file +lint: ## Verify Go files + golangci-lint run --config ./golangci.yaml ./... + +.PHONY: clean build test dev lint diff --git a/ecs/golangci.yaml b/ecs/golangci.yaml new file mode 100644 index 000000000..396293367 --- /dev/null +++ b/ecs/golangci.yaml @@ -0,0 +1,12 @@ +run: + deadline: 2m + +linters: + disable-all: true + enable: + - gofmt + - goimports + - golint + - gosimple + - ineffassign + - misspell \ No newline at end of file diff --git a/ecs/pkg/amazon/ecs.go b/ecs/pkg/amazon/ecs.go index 03ca92f4d..a1ee2f928 100644 --- a/ecs/pkg/amazon/ecs.go +++ b/ecs/pkg/amazon/ecs.go @@ -2,6 +2,7 @@ package amazon import ( "errors" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/ecs" "github.com/sirupsen/logrus"