From ef2a5e9c009a02f5d3afeba235971127e7ec4621 Mon Sep 17 00:00:00 2001 From: William Murphy Date: Wed, 16 Aug 2023 16:11:41 -0400 Subject: [PATCH] chore: exclude yardstick store from filename rules (#1440) Enables "make lint" to be run after "make quality". Previously, the linter rules that prohibit ":" in any filename would fail if the yardstick or vulnerability-match-labels directories had been initialized (e.g. if "make quality" had been run), since they have filenames like "sha256:abcd" in them. Exclude them from this lint, since they are not go files. Signed-off-by: Will Murphy --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9c28a51fda5..19e05fd97e0 100644 --- a/Makefile +++ b/Makefile @@ -142,7 +142,7 @@ lint: ## Run gofmt + golangci lint checks @[ -z "$(shell $(GOIMPORTS_CMD) -d .)" ] || (echo "goimports needs to be fixed" && false) # go tooling does not play well with certain filename characters, ensure the common cases don't result in future "go get" failures - $(eval MALFORMED_FILENAMES := $(shell find . | grep -e ':')) + $(eval MALFORMED_FILENAMES := $(shell find . | grep -e ':' | grep -v -e "test/quality/.yardstick" -e "test/quality/vulnerability-match-labels")) @bash -c "[[ '$(MALFORMED_FILENAMES)' == '' ]] || (printf '\nfound unsupported filename characters:\n$(MALFORMED_FILENAMES)\n\n' && false)" .PHONY: format