From 290a6391e6085b6d0169e78be6babfc65ee89fa6 Mon Sep 17 00:00:00 2001 From: vicanso Date: Sat, 25 Apr 2020 10:42:11 +0800 Subject: [PATCH] chore: add golangci lint --- .travis.yml | 15 +++++++-------- Makefile | 3 ++- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4c8b95e..de688e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,12 @@ language: go +sudo: required go: - - 1.x - -install: - - go get github.com/golang/lint/golint + - "1.12" + - "1.13" + - "1.14" + - master script: - - go test -race -cover ./ - -after_script: - - golint ./ \ No newline at end of file + - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin latest + - make test && make bench diff --git a/Makefile b/Makefile index 3483518..16a933a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ - .PHONY: default test test-cover dev +lint: + golangci-lint run # for test test: