Skip to content

Commit

Permalink
Add go vet to build
Browse files Browse the repository at this point in the history
  • Loading branch information
brycekahle committed Jul 25, 2017
1 parent cc0f49a commit 08f4816
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Makefile
@@ -1,9 +1,10 @@
.PONY: all build deps image lint test
CHECK_FILES?=$$(go list ./... | grep -v /vendor/)

help: ## Show this help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)

all: lint test build ## Run the tests and build the binary.
all: lint vet test build ## Run the tests and build the binary.

build: ## Build the binary.
go build -ldflags "-X github.com/netlify/gotrue/cmd.Version=`git rev-parse HEAD`"
Expand All @@ -16,8 +17,11 @@ image: ## Build the Docker image.
docker build .

lint: ## Lint the code
golint `go list ./... | grep -v /vendor/`
golint $(CHECK_FILES)

vet: # Vet the code
go vet $(CHECK_FILES)

test: ## Run tests.
rm -f api/test.db
go test -v `go list ./... | grep -v /vendor/`
go test -v $(CHECK_FILES)

0 comments on commit 08f4816

Please sign in to comment.