From 1efb1db3885b6ff68618d3f29f866fdee94e9cca Mon Sep 17 00:00:00 2001 From: Erik Godding Boye Date: Sun, 19 Jan 2025 13:32:53 +0100 Subject: [PATCH] ci(lint): enable misspell linter --- .golangci.yaml | 2 +- core/server/suspend_test.go | 2 +- pkg/git/gogit_test.go | 2 +- pkg/gitproviders/dryrun_test.go | 2 +- pkg/gitproviders/repo_url.go | 2 +- pkg/kube/kubehttp.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index ee5a4a1da5..f0405f924f 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -23,7 +23,7 @@ linters: - ineffassign #- lll - loggercheck - #- misspell + - misspell - nolintlint #- prealloc - staticcheck diff --git a/core/server/suspend_test.go b/core/server/suspend_test.go index 9e1c79310c..71d32ccc58 100644 --- a/core/server/suspend_test.go +++ b/core/server/suspend_test.go @@ -174,7 +174,7 @@ func getUnstructuredObj(t *testing.T, k client.Client, name types.NamespacedName return unstructuredObj } -// checkSuspendAnnotations checks for the existance of suspend annotations +// checkSuspendAnnotations checks for the existence of suspend annotations // passes if suspended and annotations exist, or not suspended and annotations don't exist // if annotations exist, the principal is checked in the annotation for suspended-by func checkSuspendAnnotations(t *testing.T, principalID string, annotations map[string]string, name types.NamespacedName, suspend bool) { diff --git a/pkg/git/gogit_test.go b/pkg/git/gogit_test.go index 87d0ecedcd..bbcbac0d6a 100644 --- a/pkg/git/gogit_test.go +++ b/pkg/git/gogit_test.go @@ -155,7 +155,7 @@ var _ = Describe("Read", func() { Expect(content).To(Equal(fileContent)) }) - It("Reads a file from a repo even if not commited", func() { + It("Reads a file from a repo even if not committed", func() { _, err = gitClient.Init(dir, "https://github.com/github/gitignore", "master") filePath := "/test.txt" content := []byte("testing") diff --git a/pkg/gitproviders/dryrun_test.go b/pkg/gitproviders/dryrun_test.go index 698ba494a7..293a234b7a 100644 --- a/pkg/gitproviders/dryrun_test.go +++ b/pkg/gitproviders/dryrun_test.go @@ -83,7 +83,7 @@ var _ = Describe("DryRun", func() { }) Describe("GetCommits", func() { - It("returns emtpy", func() { + It("returns empty", func() { res, err := dryRunProvider.GetCommits(ctx, repoURL, "", 1, 1) Expect(err).ToNot(HaveOccurred()) Expect(res).To(Equal([]gitprovider.Commit{})) diff --git a/pkg/gitproviders/repo_url.go b/pkg/gitproviders/repo_url.go index 146ca4f549..8eb2e1bc31 100644 --- a/pkg/gitproviders/repo_url.go +++ b/pkg/gitproviders/repo_url.go @@ -139,7 +139,7 @@ func detectGitProviderFromURL(raw string, gitHostTypes map[string]string) (GitPr // the `:` delimiter between host and path throws off the std. url parser func parseGitURL(raw string) (*url.URL, error) { if strings.HasPrefix(raw, "git@") { - // The first occurance of `:` should be the host:path delimiter. + // The first occurrence of `:` should be the host:path delimiter. raw = strings.Replace(raw, ":", "/", 1) raw = "ssh://" + raw } diff --git a/pkg/kube/kubehttp.go b/pkg/kube/kubehttp.go index b3c4012a02..815e69463f 100644 --- a/pkg/kube/kubehttp.go +++ b/pkg/kube/kubehttp.go @@ -69,7 +69,7 @@ const ( var ErrWegoConfigNotFound = errors.New("wego config not found") // InClusterConfig defines a function for checking if this code is executing in kubernetes. -// This can be overriden if needed. +// This can be overridden if needed. var InClusterConfig func() (*rest.Config, error) = rest.InClusterConfig var ErrNamespaceNotFound = errors.New("namespace not found")