Skip to content

Commit

Permalink
add fmt and vet make target
Browse files Browse the repository at this point in the history
  • Loading branch information
andyxning committed Dec 21, 2016
2 parents ec46587 + 166acaf commit 51609be
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: all container push clean node-problem-detector
.PHONY: all container push clean node-problem-detector vet fmt

all: push

Expand All @@ -9,7 +9,13 @@ PROJ = google_containers

PKG_SOURCES := $(shell find pkg -name '*.go')

node-problem-detector: $(PKG_SOURCES) node_problem_detector.go
vet:
go list ./... | grep -v "./vendor*" | xargs go vet

fmt:
find . -type f -name "*.go" | grep -v "./vendor*" | xargs gofmt -s -w

node-problem-detector: $(PKG_SOURCES) node_problem_detector.go fmt vet
GOOS=linux go build -ldflags '-w -extldflags "-static"' -o node-problem-detector

test:
Expand Down

0 comments on commit 51609be

Please sign in to comment.