Skip to content

Commit

Permalink
chore: exclude yardstick store from filename rules (#1440)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
willmurphyscode authored Aug 16, 2023
1 parent 1c084c4 commit ef2a5e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ef2a5e9

Please sign in to comment.