GOTEST ?= .

lint:
	gometalinter --vendor --dupl-threshold=150 --min-confidence=.3 --tests --deadline=90s --disable-all -Egolint -Etest -Eineffassign -Etestify -Eunconvert -Estaticcheck -Egoconst -Egocyclo -Eerrcheck -Egofmt -Evet -Edupl -Einterfacer -Estructcheck -Evetshadow -Egosimple -Egoimports -Evarcheck -Emisspell -Ealigncheck -Etest --exclude=/usr/local/go/src ./...

test:
	go test -race ./...

integration_test:
	go test -race -tags=integration ./...

bench:
	go test -bench=Benchmark ./...

fix:
	find . -iname '*.go' -not -path '*/vendor/*' -print0 | xargs -0 gofmt -s -w
	find . -iname '*.go' -not -path '*/vendor/*' -print0 | xargs -0 goimports -w
	terraform fmt

ci: lint test
