Add linter to makefile and to circleci
This commit is contained in:
@@ -8,6 +8,7 @@ jobs:
|
|||||||
- image: circleci/golang:1.13
|
- image: circleci/golang:1.13
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
- run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.20.0
|
||||||
- run: make
|
- run: make
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: .
|
root: .
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
.PHONY: build test coverage install acceptance deps
|
.PHONY: lint build test race coverage install acceptance deps
|
||||||
|
|
||||||
GOCMD=go
|
GOCMD=go
|
||||||
GOBUILD=$(GOCMD) build
|
GOBUILD=$(GOCMD) build
|
||||||
GOGET=$(GOCMD) get
|
GOGET=$(GOCMD) get
|
||||||
GOTEST=$(GOCMD) test
|
GOTEST=$(GOCMD) test
|
||||||
GOTOOL=$(GOCMD) tool
|
GOTOOL=$(GOCMD) tool
|
||||||
|
GOLANGLINT=golangci-lint
|
||||||
|
|
||||||
BUILD_DIR=./build
|
BUILD_DIR=./build
|
||||||
OUTPUT_DIR=./output
|
OUTPUT_DIR=./output
|
||||||
@@ -12,7 +13,10 @@ TMP_DIR=/tmp
|
|||||||
|
|
||||||
BINARY_NAME=kapow
|
BINARY_NAME=kapow
|
||||||
|
|
||||||
all: test race build
|
all: lint test race build
|
||||||
|
|
||||||
|
lint:
|
||||||
|
$(GOLANGLINT) run
|
||||||
|
|
||||||
build: deps
|
build: deps
|
||||||
mkdir -p $(BUILD_DIR)
|
mkdir -p $(BUILD_DIR)
|
||||||
|
|||||||
Reference in New Issue
Block a user