Skip to content

Commit d710745

Browse files
authored
chore(lint): Enable spelling linter (#773)
Signed-off-by: Jann Fischer <[email protected]>
1 parent a65410b commit d710745

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ linters:
66
- vet
77
- goimports
88
- ineffassign
9+
- misspell
910
- unconvert
1011
- unused
1112
linters-settings:

ext/git/writer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type CommitOptions struct {
2424

2525
// Commit perfoms a git commit for the given pathSpec to the currently checked
2626
// out branch. If pathSpec is empty, or the special value "*", all pending
27-
// changes will be commited. If message is not the empty string, it will be
27+
// changes will be committed. If message is not the empty string, it will be
2828
// used as the commit message, otherwise a default commit message will be used.
2929
// If signingKey is not the empty string, commit will be signed with the given
3030
// GPG or SSH key.

pkg/argocd/update_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ func Test_UpdateApplication(t *testing.T) {
845845
assert.Equal(t, 0, res.NumImagesUpdated)
846846
})
847847

848-
t.Run("Update from infered registry", func(t *testing.T) {
848+
t.Run("Update from inferred registry", func(t *testing.T) {
849849
mockClientFn := func(endpoint *registry.RegistryEndpoint, username, password string) (registry.RegistryClient, error) {
850850
regMock := regmock.RegistryClient{}
851851
regMock.On("NewRepository", mock.Anything).Return(nil)

pkg/metrics/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func (apm *ApplicationMetrics) IncreaseImageUpdate(application string, by int) {
155155
apm.imagesUpdatedTotal.WithLabelValues(application).Add(float64(by))
156156
}
157157

158-
// IncreaseUpdateErrors increases the number of errors for given application occured during update process
158+
// IncreaseUpdateErrors increases the number of errors for given application occurred during update process
159159
func (apm *ApplicationMetrics) IncreaseUpdateErrors(application string, by int) {
160160
apm.imagesUpdatedErrorsTotal.WithLabelValues(application).Add(float64(by))
161161
}

pkg/registry/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ func TagInfoFromReferences(client *registryClient, opts *options.ManifestOptions
425425
return ti, nil
426426
}
427427

428-
// Implementation of ping method to intialize the challenge list
428+
// Implementation of ping method to initialize the challenge list
429429
// Without this, tokenHandler and AuthorizationHandler won't work
430430
func ping(manager challenge.Manager, endpoint *RegistryEndpoint, versionHeader string) ([]auth.APIVersion, error) {
431431
httpc := &http.Client{Transport: endpoint.GetTransport()}
@@ -435,7 +435,7 @@ func ping(manager challenge.Manager, endpoint *RegistryEndpoint, versionHeader s
435435
return nil, err
436436
}
437437
defer resp.Body.Close()
438-
// Let's consider only HTTP 200 and 401 valid responses for the inital request
438+
// Let's consider only HTTP 200 and 401 valid responses for the initial request
439439
if resp.StatusCode != 200 && resp.StatusCode != 401 {
440440
return nil, fmt.Errorf("endpoint %s does not seem to be a valid v2 Docker Registry API (received HTTP code %d for GET %s)", endpoint.RegistryAPI, resp.StatusCode, url)
441441
}

pkg/registry/endpoints.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ type RegistryEndpoint struct {
9191
}
9292

9393
// registryTweaks should contain a list of registries whose settings cannot be
94-
// infered by just looking at the image prefix. Prominent example here is the
95-
// Docker Hub registry, which is refered to as docker.io from the image, but
94+
// inferred by just looking at the image prefix. Prominent example here is the
95+
// Docker Hub registry, which is referred to as docker.io from the image, but
9696
// its API endpoint is https://registry-1.docker.io (and not https://docker.io)
9797
var registryTweaks map[string]*RegistryEndpoint = map[string]*RegistryEndpoint{
9898
"docker.io": {
@@ -172,7 +172,7 @@ func AddRegistryEndpoint(ep *RegistryEndpoint) error {
172172
}
173173

174174
// inferRegistryEndpointFromPrefix returns a registry endpoint with the API
175-
// URL infered from the prefix and adds it to the list of the configured
175+
// URL inferred from the prefix and adds it to the list of the configured
176176
// registries.
177177
func inferRegistryEndpointFromPrefix(prefix string) *RegistryEndpoint {
178178
apiURL := "https://" + prefix

0 commit comments

Comments
 (0)