Skip to content

Commit

Permalink
Fix lint task in CI
Browse files Browse the repository at this point in the history
The lint task was failing at head, due to a nolint:exhaustive error
directive that golangci nolintlint believes is unused.

Issue seems to be golangci/golangci-lint#3228
and seems to be a bug in golang-ci / nolintlint, using the workaround
proposed in golangci/golangci-lint#1940
which is to clear the cache between runs.
  • Loading branch information
justinsb committed Mar 20, 2023
1 parent ce3e394 commit 5dcf0ae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Makefile-modules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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|') \
Expand Down

0 comments on commit 5dcf0ae

Please sign in to comment.