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 <will.murphy@anchore.com>
This commit is contained in:
William Murphy 2023-08-16 16:11:41 -04:00 committed by GitHub
parent 1c084c44b0
commit ef2a5e9c00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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