check for unsupported "go get" chars (#100)

This commit is contained in:
Alex Goodman
2020-07-23 13:08:31 -04:00
committed by GitHub
parent ba4f63099d
commit 5ccd6d5f6a
5 changed files with 16 additions and 6 deletions
+7
View File
@@ -90,10 +90,17 @@ bootstrap: ## Download and install all go dependencies (+ prep tooling in the ./
.PHONY: lint
lint: ## Run gofmt + golangci lint checks
$(call title,Running linters)
# ensure there are no go fmt differences
@printf "files with gofmt issues: [$(shell gofmt -l -s .)]\n"
@test -z "$(shell gofmt -l -s .)"
# run all golangci-lint rules
$(LINTCMD)
# 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 ':'))
@bash -c "[[ '$(MALFORMED_FILENAMES)' == '' ]] || (printf '\nfound unsupported filename characters:\n$(MALFORMED_FILENAMES)\n\n' && false)"
.PHONY: lint-fix
lint-fix: ## Auto-format all source code + run golangci lint fixers
$(call title,Running lint fixers)