lego/Makefile
Ludovic Fernandez ad20bf90ff Migrate to golangci-lint (#644)
* refactor: linting.

- errcheck
- govet
- golint
- goconst
- spellcheck
- ...

* refactor: migrate from gometalinter to golangci-lint.
2018-09-24 19:07:20 +00:00

25 lines
433 B
Makefile

.PHONY: all
GOFILES := $(shell go list -f '{{range $$index, $$element := .GoFiles}}{{$$.Dir}}/{{$$element}}{{"\n"}}{{end}}' ./... | grep -v '/vendor/')
default: clean checks test build
clean:
rm -rf dist/ builds/ cover.out
build: clean
go build
dependencies:
dep ensure -v
test: clean
go test -v -cover ./...
checks:
golangci-lint run
check-fmt: SHELL := /bin/bash
check-fmt:
diff -u <(echo -n) <(gofmt -d $(GOFILES))