From 5c39ac537a4e04e9f0aa42232a2cc22ea06c5c8d Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 24 Jan 2025 09:21:02 +0100 Subject: [PATCH] build: remove broken make target lint The lint make target is not used anywhere in the codebase and is particular not run in the CI. It was recently discovered that `make lint` does not even work at all. It was subsequently suggested to remove the broken and unused target altogether. This change settles that issue by removing the lint target and the preparatory golint installation target. Fixes: #15317 Signed-off-by: Michael Adam --- Makefile | 4 ---- build/makelib/golang.mk | 12 ------------ 2 files changed, 16 deletions(-) diff --git a/Makefile b/Makefile index 309cfe58c..882df39e5 100644 --- a/Makefile +++ b/Makefile @@ -149,10 +149,6 @@ check test: ## Runs unit tests. test-integration: ## Runs integration tests. @$(MAKE) go.test.integration -lint: ## Check syntax and styling of go sources. - @$(MAKE) go.init - @$(MAKE) go.lint - vet: ## Runs lint checks on go sources. @$(MAKE) go.init @$(MAKE) go.vet diff --git a/build/makelib/golang.mk b/build/makelib/golang.mk index ec820e1f9..fdef2670c 100644 --- a/build/makelib/golang.mk +++ b/build/makelib/golang.mk @@ -64,7 +64,6 @@ endif GOPATH := $(shell go env GOPATH) # setup tools used during the build -GOLINT := $(TOOLS_HOST_DIR)/golint GOJUNIT := $(TOOLS_DIR)/go-junit-report GO := go @@ -144,11 +143,6 @@ go.test.integration: $(GOJUNIT) CGO_ENABLED=$(CGO_ENABLED_VALUE) $(GOHOST) test -v -timeout 7200s $(GO_TEST_FLAGS) $(GO_STATIC_FLAGS) $(GO_INTEGRATION_TEST_PACKAGES) $(TEST_FILTER_PARAM) 2>&1 | tee $(GO_TEST_OUTPUT)/integration-tests.log @cat $(GO_TEST_OUTPUT)/integration-tests.log | $(GOJUNIT) -set-exit-code > $(GO_TEST_OUTPUT)/integration-tests.xml -.PHONY: go.lint -go.lint: $(GOLINT) - @echo === go lint - @$(GOLINT) -set_exit_status=true $(GO_PACKAGES) $(GO_INTEGRATION_TEST_PACKAGES) - .PHONY: go.vet go.vet: @echo === go vet @@ -185,12 +179,6 @@ go.mod.clean: @sudo rm -fr $(WORK_DIR)/cross_pkg @$(GOHOST) clean -modcache -$(GOLINT): - @echo === installing golint - @mkdir -p $(TOOLS_HOST_DIR)/tmp - @GOPATH=$(TOOLS_HOST_DIR)/tmp GOBIN=$(TOOLS_HOST_DIR) $(GOHOST) get github.com/golang/lint/golint - @rm -fr $(TOOLS_HOST_DIR)/tmp - $(GOFMT): @echo === installing gofmt$(GOFMT_VERSION) @mkdir -p $(TOOLS_HOST_DIR)/tmp