Skip to content

Commit eadc771

Browse files
makefile: start treating vet as a check
This adds vet as a check in `make check`. Additionally, it moves the run of vet in `make test` and `make manager` to after the build. I wanted to remove it entirely from that line but decided not to make such a big change. Vet needs to run after compile because it prints a 'vet: ' prefix on compile errors [1], and this messes up tools - specifically my vim quickfix. Doing the build first makes you fix real compiler errors and then real vet errors found afterward get emitted without the annoying prefix. [1]: golang/go#34142 Signed-off-by: John Mulligan <[email protected]>
1 parent 85f3a48 commit eadc771

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ endif
4343
all: manager build-integration-tests
4444

4545
# Run tests
46-
test: generate vet manifests
46+
test: generate manifests vet
4747
hack/test.sh
4848

4949
# Build manager binary
50-
manager: generate vet build
50+
manager: generate build vet
5151

5252
build:
5353
go build -o bin/manager -ldflags "-X main.Version=$(GIT_VERSION) -X main.CommitID=$(COMMIT_ID)" main.go
@@ -170,7 +170,7 @@ bundle-build:
170170

171171
.PHONY: check check-revive check-format
172172

173-
check: check-revive check-format
173+
check: check-revive check-format vet
174174

175175
check-format:
176176
! gofmt $(CHECK_GOFMT_FLAGS) . | sed 's,^,formatting error: ,' | grep 'go$$'

0 commit comments

Comments
 (0)