Skip to content

Commit d011bdb

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 1e49fdc commit d011bdb

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
@@ -39,11 +39,11 @@ endif
3939
all: manager build-integration-tests
4040

4141
# Run tests
42-
test: generate vet manifests
42+
test: generate manifests vet
4343
hack/test.sh
4444

4545
# Build manager binary
46-
manager: generate vet build
46+
manager: generate build vet
4747

4848
build:
4949
go build -o bin/manager main.go
@@ -163,7 +163,7 @@ bundle-build:
163163

164164
.PHONY: check check-revive check-format
165165

166-
check: check-revive check-format
166+
check: check-revive check-format vet
167167

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

0 commit comments

Comments
 (0)