From c105187d9a03be869eba36c3f88ae198c96facbb Mon Sep 17 00:00:00 2001 From: Camila Macedo <7708031+camilamacedo86@users.noreply.github.com> Date: Wed, 5 Feb 2025 22:38:18 +0000 Subject: [PATCH 1/2] Remove 'make vet' from Makefile, simplify; keep 'vet' enabled in linting --- .golangci.yaml | 1 + Makefile | 10 +++------- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index 1ecb40994..fcb1bb420 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -23,6 +23,7 @@ linters: - errorlint - gci - gofmt + - govet - gosec - importas - misspell diff --git a/Makefile b/Makefile index 5625d8696..2be15cc0e 100644 --- a/Makefile +++ b/Makefile @@ -117,7 +117,7 @@ generate: $(CONTROLLER_GEN) #EXHELP Generate code containing DeepCopy, DeepCopyI $(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." .PHONY: verify -verify: tidy fmt vet generate manifests crd-ref-docs #HELP Verify all generated code is up-to-date. +verify: tidy fmt generate manifests crd-ref-docs #HELP Verify all generated code is up-to-date. git diff --exit-code .PHONY: fix-lint @@ -128,10 +128,6 @@ fix-lint: $(GOLANGCI_LINT) #EXHELP Fix lint issues fmt: #EXHELP Formats code go fmt ./... -.PHONY: vet -vet: #EXHELP Run go vet against code. - go vet -tags '$(GO_BUILD_TAGS)' ./... - .PHONY: bingo-upgrade bingo-upgrade: $(BINGO) #EXHELP Upgrade tools @for pkg in $$($(BINGO) list | awk '{ print $$3 }' | tail -n +3 | sed 's/@.*//'); do \ @@ -151,7 +147,7 @@ verify-crd-compatibility: $(CRD_DIFF) manifests .PHONY: test -test: manifests generate fmt vet test-unit test-e2e #HELP Run all tests. +test: manifests generate fmt test-unit test-e2e #HELP Run all tests. .PHONY: e2e e2e: #EXHELP Run the e2e tests. @@ -291,7 +287,7 @@ $(BINARIES): go build $(GO_BUILD_FLAGS) -tags '$(GO_BUILD_TAGS)' -ldflags '$(GO_BUILD_LDFLAGS)' -gcflags '$(GO_BUILD_GCFLAGS)' -asmflags '$(GO_BUILD_ASMFLAGS)' -o $(BUILDBIN)/$@ ./cmd/$@ .PHONY: build-deps -build-deps: manifests generate fmt vet +build-deps: manifests generate fmt .PHONY: build go-build-local build: build-deps go-build-local #HELP Build manager binary for current GOOS and GOARCH. Default target. From 07baba97bc31ab3e867c0b31a755e19a1dd2b6da Mon Sep 17 00:00:00 2001 From: Camila Macedo <7708031+camilamacedo86@users.noreply.github.com> Date: Thu, 6 Feb 2025 00:08:49 +0000 Subject: [PATCH 2/2] Apply suggestions from code review --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2be15cc0e..ba2bc7953 100644 --- a/Makefile +++ b/Makefile @@ -147,7 +147,7 @@ verify-crd-compatibility: $(CRD_DIFF) manifests .PHONY: test -test: manifests generate fmt test-unit test-e2e #HELP Run all tests. +test: manifests generate fmt lint test-unit test-e2e #HELP Run all tests. .PHONY: e2e e2e: #EXHELP Run the e2e tests.