Skip to content

Commit 750c292

Browse files
authored
Merge pull request #53 from andyxning/add_fmt_and_vet_make_target
add fmt and vet make target
2 parents ec46587 + bb48848 commit 750c292

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: all container push clean node-problem-detector
1+
.PHONY: all container push clean node-problem-detector vet fmt
22

33
all: push
44

@@ -9,7 +9,13 @@ PROJ = google_containers
99

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

12-
node-problem-detector: $(PKG_SOURCES) node_problem_detector.go
12+
vet:
13+
go list ./... | grep -v "./vendor/*" | xargs go vet
14+
15+
fmt:
16+
find . -type f -name "*.go" | grep -v "./vendor/*" | xargs gofmt -s -w -l
17+
18+
node-problem-detector: $(PKG_SOURCES) node_problem_detector.go fmt vet
1319
GOOS=linux go build -ldflags '-w -extldflags "-static"' -o node-problem-detector
1420

1521
test:

0 commit comments

Comments
 (0)