Skip to content

Commit

Permalink
Update fmt target
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Feb 26, 2020
1 parent 5b0790b commit 3f9f185
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ Version := $(shell git describe --tags --dirty)
GitCommit := $(shell git rev-parse HEAD)
LDFLAGS := "-s -w -X github.com/alexellis/arkade/cmd.Version=$(Version) -X github.com/alexellis/arkade/cmd.GitCommit=$(GitCommit)"
PLATFORM := $(shell ./hack/platform-tag.sh)
SOURCE_DIRS = cmd pkg main.go

.PHONY: all

.PHONY: build
build:
go build

.PHONY: fmtcheck
fmt: ## Checks for style violation using gofmt
@gofmt -l -s $(SOURCE_DIRS) | grep ".*\.go"; if [ "$$?" = "0" ]; then echo "Run gofmt -w -s ./path" && exit 1; fi

.PHONY: test
test:
CGO_ENABLED=0 go test $(shell go list ./... | grep -v /vendor/|xargs echo) -cover
Expand Down

0 comments on commit 3f9f185

Please sign in to comment.