Skip to content

Commit 6ee839b

Browse files
authored
Remove explicit misspell (elastic#1182)
* Remove explicit misspell This is included in golangci-lint so we're just duplicating work here * Enable misspell * Good to see the linters actually working now 👍 * Maintain ability to regenerate the Kibana API client * Fixup lint workflow
1 parent a50b48b commit 6ee839b

File tree

9 files changed

+10
-36
lines changed

9 files changed

+10
-36
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ jobs:
3737
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
3838
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
3939
with:
40-
go-version-file: 'tools/go.mod'
40+
go-version-file: 'go.mod'
4141
cache: true
42-
cache-dependency-path: tools/go.sum
42+
cache-dependency-path: go.sum
4343
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3
4444
with:
4545
terraform_wrapper: false

.golangci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
version: "2"
22
linters:
3+
enable:
4+
- misspell
35
exclusions:
46
generated: lax
57
presets:

Makefile

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -245,27 +245,16 @@ install: build ## Install built provider into the local terraform cache
245245

246246

247247
.PHONY: tools
248-
tools: $(GOBIN) tools-golangci-lint ## Install useful tools for linting, docs generation and development
249-
@ cd tools && go install github.com/client9/misspell/cmd/misspell
250-
251-
.PHONY: tools-golangci-lint
252-
tools-golangci-lint: ## Download golangci-lint locally if necessary.
248+
tools: $(GOBIN) ## Download golangci-lint locally if necessary.
253249
@[[ -f $(GOBIN)/golangci-lint ]] || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v2.2.1
254250

255-
256-
.PHONY: misspell
257-
misspell:
258-
@ $(GOBIN)/misspell -error -source go ./internal/
259-
@ $(GOBIN)/misspell -error -source text ./templates/
260-
261-
262251
.PHONY: golangci-lint
263252
golangci-lint:
264253
@ $(GOBIN)/golangci-lint run --max-same-issues=0 $(GOLANGCIFLAGS) ./internal/...
265254

266255

267256
.PHONY: lint
268-
lint: setup misspell golangci-lint check-fmt check-docs ## Run lints to check the spelling and common go patterns
257+
lint: setup golangci-lint check-fmt check-docs ## Run lints to check the spelling and common go patterns
269258

270259
.PHONY: fmt
271260
fmt: ## Format code

generated/kbapi/kibana.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package kbapi
2+
3+
//go:generate make clean all

internal/elasticsearch/security/api_key/schema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,6 @@ func (r *Resource) requiresReplaceIfUpdateNotSupported() planmodifier.String {
117117
resp.RequiresReplace = version != nil && version.LessThan(MinVersionWithUpdate)
118118
},
119119
"Requires replace if the server does not support update",
120-
"Requries replace if the server does not support update",
120+
"Requires replace if the server does not support update",
121121
)
122122
}

tools/go.mod

Lines changed: 0 additions & 7 deletions
This file was deleted.

tools/go.sum

Lines changed: 0 additions & 2 deletions
This file was deleted.

tools/kbapi_gen.go

Lines changed: 0 additions & 3 deletions
This file was deleted.

tools/tools.go

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)