From 5dcf0ae683e4e2f009a20e6111bc1400f8138d37 Mon Sep 17 00:00:00 2001 From: justinsb Date: Mon, 20 Mar 2023 13:49:38 +0000 Subject: [PATCH] Fix lint task in CI The lint task was failing at head, due to a nolint:exhaustive error directive that golangci nolintlint believes is unused. Issue seems to be https://github.com/golangci/golangci-lint/issues/3228 and seems to be a bug in golang-ci / nolintlint, using the workaround proposed in https://github.com/golangci/golangci-lint/issues/1940 which is to clear the cache between runs. --- Makefile-modules.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile-modules.mk b/Makefile-modules.mk index 7c2301f107..497428b5d8 100644 --- a/Makefile-modules.mk +++ b/Makefile-modules.mk @@ -14,6 +14,7 @@ include $(KUSTOMIZE_ROOT)/Makefile-tools.mk .PHONY: lint test fix fmt tidy vet build lint: $(MYGOBIN)/golangci-lint + $(MYGOBIN)/golangci-lint cache clean # Workaround for https://github.com/golangci/golangci-lint/issues/3228 $(MYGOBIN)/golangci-lint \ -c $$KUSTOMIZE_ROOT/.golangci.yml \ --path-prefix $(shell pwd | sed -E 's|(.*\/kustomize)/(.*)|\2|') \