From 325dfb430a2fedf12304978bbc720e898fa159b3 Mon Sep 17 00:00:00 2001 From: Yuki Iwanaga Date: Mon, 13 Mar 2023 19:42:06 +0900 Subject: [PATCH] Fix CI: golint -> golangci-lint --- .circleci/config.yml | 6 +++++- Makefile | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1ad2fc9..0cede3f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,7 +17,11 @@ jobs: key: go-mod-v4-{{ checksum "go.sum" }} paths: - "/go/pkg/mod" - - run: go get -u golang.org/x/lint/golint + - run: + name: Install golangci-lint + command: | + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \ + | sh -s -- -b "$(go env GOPATH)/bin" v1.51.2 - run: name: Run tests command: make ci-test diff --git a/Makefile b/Makefile index bd42d46..404212a 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,7 @@ SRC_FILES := $(shell find . -name '*.go' -not -path './vendor/*') .PHONY: lint lint: @gofmt -e -d -s $(SRC_FILES) | awk '{ e = 1; print $0 } END { if (e) exit(1) }' - @echo $(SRC_FILES) | xargs -n1 golint -set_exit_status - @go vet $(PACKAGE_DIRS) + @golangci-lint --disable errcheck,unused run .PHONY: test test: lint