ci: Run hclogvet across all codebase and fix found issue. (#26545)

This commit is contained in:
James Rasell
2025-08-18 15:06:11 +01:00
committed by GitHub
parent fc0265c56d
commit 1ae83114c1
2 changed files with 10 additions and 2 deletions

View File

@@ -34,6 +34,14 @@ ifndef NOMAD_NO_UI
GO_TAGS := ui $(GO_TAGS)
endif
# Some Go tools require the tags to be a comma-separated list. Perform a
# substitution from the space to a comma and create a new variable, so we can
# use both
null :=
space := $(null) #
comma := ,
GO_TAGS_COMMA := $(subst $(space),$(comma),$(strip $(GO_TAGS)))
#GOTEST_GROUP is set in CI pipelines. We have to set it for local run.
ifndef GOTEST_GROUP
GOTEST_GROUP := nomad client command drivers quick
@@ -163,7 +171,7 @@ check: ## Lint the source code
@cd ./api && golangci-lint run --config ../.golangci.yml --build-tags "$(GO_TAGS)"
@echo "==> Linting hclog statements..."
@hclogvet .
@GOFLAGS="-tags=$(GO_TAGS_COMMA)" hclogvet ./...
@echo "==> Spell checking website..."
@misspell -error -source=text website/content/