@@ -87,9 +87,11 @@ test-e2e: chainsaw # Run e2e tests against the K8s cluster specified in ~/.kube/
8787 $(CHAINSAW ) test --values ./test/e2e/values.yaml
8888
8989.PHONY : lint
90- lint : golangci-lint.client golangci-lint.controller golangci-lint.sidecar # # Run all linters (suggest `make -k`)
90+ lint : golangci-lint.client golangci-lint.controller golangci-lint.sidecar spell-lint # # Run all linters (suggest `make -k`)
9191golangci-lint.% : golangci-lint
9292 cd $* && $(GOLANGCI_LINT ) run $(GOLANGCI_LINT_RUN_OPTS ) --config $(CURDIR ) /.golangci.yaml --new
93+ spell-lint :
94+ git ls-files | grep -v -e CHANGELOG -e go.mod -e go.sum -e vendor | xargs $(SPELL_LINT ) -i " Creater,creater,ect" -error -o stderr
9395
9496.PHONY : lint-fix
9597lint-fix : golangci-lint-fix.client golangci-lint-fix.controller golangci-lint-fix.sidecar # # Run all linters and perform fixes where possible (suggest `make -k`)
@@ -167,6 +169,7 @@ GOLANGCI_LINT ?= $(TOOLBIN)/golangci-lint
167169KIND ?= $(TOOLBIN ) /kind
168170KUSTOMIZE ?= $(TOOLBIN ) /kustomize
169171MDBOOK ?= $(TOOLBIN ) /mdbook
172+ SPELL_LINT ?= $(TOOLBIN ) /spell-lint
170173
171174# Tool Versions
172175CHAINSAW_VERSION ?= v0.2.12
@@ -176,6 +179,7 @@ GOLANGCI_LINT_VERSION ?= v1.64.7
176179KIND_VERSION ?= v0.27.0
177180KUSTOMIZE_VERSION ?= v5.6.0
178181MDBOOK_VERSION ?= v0.4.47
182+ SPELL_LINT_VERSION ?= v0.6.0
179183
180184.PHONY : chainsaw
181185chainsaw : $(CHAINSAW ) -$(CHAINSAW_VERSION )
@@ -212,6 +216,11 @@ mdbook: $(MDBOOK)-$(MDBOOK_VERSION)
212216$(MDBOOK ) -$(MDBOOK_VERSION ) : $(TOOLBIN )
213217 ./hack/tools/install-mdbook.sh $(MDBOOK ) $(MDBOOK_VERSION )
214218
219+ .PHONY : spell-lint
220+ spell-lint : $(SPELL_LINT ) -$(SPELL_LINT_VERSION )
221+ $(SPELL_LINT ) -$(SPELL_LINT_VERSION ) : $(TOOLBIN )
222+ ./hack/tools/install-misspell-lint.sh $(TOOLBIN ) $(SPELL_LINT ) $(SPELL_LINT_VERSION )
223+
215224# go-install-tool will 'go install' any package with custom target and name of binary, if it doesn't exist
216225# $1 - target path with name of binary
217226# $2 - package url which can be installed
0 commit comments