From a724574ede5d3ae4ba353e0810b9147625187e25 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Wed, 27 May 2020 13:22:13 -0400 Subject: [PATCH] chore: Spelling (#3647) chore: Spelling (#3647) --- Makefile | 2 +- assets/swagger.json | 6 +++--- cmd/argocd/commands/app.go | 2 +- controller/appcontroller.go | 2 +- controller/appcontroller_test.go | 2 +- controller/cache/cache.go | 6 +++--- docs/operator-manual/argocd-secret.yaml | 2 +- examples/dashboard.json | 2 +- hack/gen-crd-spec/main.go | 4 ++-- hack/generate-proto.sh | 2 +- hack/git-ask-pass.sh | 2 +- manifests/crds/application-crd.yaml | 2 +- manifests/ha/install.yaml | 2 +- manifests/ha/namespace-install.yaml | 2 +- manifests/install.yaml | 2 +- manifests/namespace-install.yaml | 2 +- pkg/apiclient/repocreds/repocreds.pb.go | 2 +- pkg/apis/application/v1alpha1/generated.proto | 2 +- pkg/apis/application/v1alpha1/openapi_generated.go | 2 +- pkg/apis/application/v1alpha1/types.go | 4 ++-- reposerver/apiclient/clientset.go | 2 +- reposerver/apiclient/repository.pb.go | 2 +- reposerver/repository/repository.proto | 2 +- .../networking.gke.io/ManagedCertificate/health.lua | 2 +- .../networking.gke.io/ManagedCertificate/health_test.yaml | 2 +- server/application/application.go | 2 +- server/project/project_test.go | 6 +++--- server/repocreds/repocreds.proto | 2 +- server/session/ratelimiter.go | 2 +- sonar-project.properties | 2 +- test/e2e/helm_test.go | 2 +- test/e2e/selective_sync_test.go | 2 +- ui/src/app/login/components/login.scss | 2 +- .../project-role-policies-edit.tsx | 4 ++-- util/argo/argo_test.go | 6 +++--- util/cache/redis_test.go | 6 +++--- util/cert/cert.go | 2 +- util/cert/cert_test.go | 2 +- util/db/db.go | 2 +- .../testdata/kustomization_yaml/kustomization.yaml | 2 +- .../{statefullset.yaml => statefulset.yaml} | 0 util/rbac/rbac.go | 2 +- util/session/sessionmanager_test.go | 2 +- util/settings/settings_test.go | 2 +- util/tls/tls.go | 2 +- 45 files changed, 57 insertions(+), 57 deletions(-) rename util/kustomize/testdata/kustomization_yaml/{statefullset.yaml => statefulset.yaml} (100%) diff --git a/Makefile b/Makefile index cfa68f3e8e944..88e149d9bd742 100644 --- a/Makefile +++ b/Makefile @@ -384,7 +384,7 @@ start-local: mod-vendor-local ARGOCD_E2E_TEST=false \ goreman -f $(ARGOCD_PROCFILE) start ${ARGOCD_START} -# Runs pre-commit validaiton with the virtualized toolchain +# Runs pre-commit validation with the virtualized toolchain .PHONY: pre-commit pre-commit: dep-ensure codegen build lint test diff --git a/assets/swagger.json b/assets/swagger.json index 345654e820f5f..e0291352e31a2 100644 --- a/assets/swagger.json +++ b/assets/swagger.json @@ -2511,7 +2511,7 @@ }, "repocredsRepoCredsResponse": { "type": "object", - "title": "RepoCredsResponse is a resonse to most repository credentials requests" + "title": "RepoCredsResponse is a response to most repository credentials requests" }, "repositoryAppInfo": { "type": "object", @@ -2615,7 +2615,7 @@ "$ref": "#/definitions/repositoryKsonnetEnvironmentDestination" }, "k8sVersion": { - "description": "KubernetesVersion is the kubernetes version the targetted cluster is running on.", + "description": "KubernetesVersion is the kubernetes version the targeted cluster is running on.", "type": "string" }, "name": { @@ -4590,7 +4590,7 @@ }, "syncOptions": { "type": "array", - "title": "Options allow youe to specify whole app sync-options", + "title": "Options allow you to specify whole app sync-options", "items": { "type": "string" } diff --git a/cmd/argocd/commands/app.go b/cmd/argocd/commands/app.go index 1519a564df38b..aba50f68f77d5 100644 --- a/cmd/argocd/commands/app.go +++ b/cmd/argocd/commands/app.go @@ -569,7 +569,7 @@ func setAppSpecOptions(flags *pflag.FlagSet, spec *argoappv1.ApplicationSpec, ap } if flags.Changed("self-heal") { if spec.SyncPolicy == nil || spec.SyncPolicy.Automated == nil { - log.Fatal("Cannot set --self-helf: application not configured with automatic sync") + log.Fatal("Cannot set --self-heal: application not configured with automatic sync") } spec.SyncPolicy.Automated.SelfHeal = appOpts.selfHeal } diff --git a/controller/appcontroller.go b/controller/appcontroller.go index 439df131eb957..5c3256e8fb596 100644 --- a/controller/appcontroller.go +++ b/controller/appcontroller.go @@ -549,7 +549,7 @@ func (ctrl *ApplicationController) processAppComparisonTypeQueueItem() (processN return } -// shouldbeDeleted returns whether a given resource obj should be deleted on cascade delete of application app +// shouldBeDeleted returns whether a given resource obj should be deleted on cascade delete of application app func (ctrl *ApplicationController) shouldBeDeleted(app *appv1.Application, obj *unstructured.Unstructured) bool { return !kube.IsCRD(obj) && !isSelfReferencedApp(app, kube.GetObjectRef(obj)) } diff --git a/controller/appcontroller_test.go b/controller/appcontroller_test.go index 27586ad3a3183..b61720cbff364 100644 --- a/controller/appcontroller_test.go +++ b/controller/appcontroller_test.go @@ -470,7 +470,7 @@ func TestFinalizeAppDeletion(t *testing.T) { assert.True(t, patched) } - // Ensure any stray resources irregulary labeled with instance label of app are not deleted upon deleting, + // Ensure any stray resources irregularly labeled with instance label of app are not deleted upon deleting, // when app project restriction is in place { defaultProj := argoappv1.AppProject{ diff --git a/controller/cache/cache.go b/controller/cache/cache.go index 6f0b5e92463d7..f4fcd7f47180a 100644 --- a/controller/cache/cache.go +++ b/controller/cache/cache.go @@ -188,9 +188,9 @@ var ( } ) -// skipAppRequeing checks if the object is an API type which we want to skip requeuing against. +// skipAppRequeuing checks if the object is an API type which we want to skip requeuing against. // We ignore API types which have a high churn rate, and/or whose updates are irrelevant to the app -func skipAppRequeing(key kube.ResourceKey) bool { +func skipAppRequeuing(key kube.ResourceKey) bool { return ignoredRefreshResources[key.Group+"/"+key.Kind] } @@ -244,7 +244,7 @@ func (c *liveStateCache) getCluster(server string) (clustercache.ClusterCache, e continue } app := getApp(r, namespaceResources) - if app == "" || skipAppRequeing(r.ResourceKey()) { + if app == "" || skipAppRequeuing(r.ResourceKey()) { continue } toNotify[app] = isRootAppNode(r) || toNotify[app] diff --git a/docs/operator-manual/argocd-secret.yaml b/docs/operator-manual/argocd-secret.yaml index 4389b29dd660f..d19f08ec2e7a6 100644 --- a/docs/operator-manual/argocd-secret.yaml +++ b/docs/operator-manual/argocd-secret.yaml @@ -9,7 +9,7 @@ metadata: type: Opaque data: # TLS certificate and private key for API server (required). - # Autogenerated with a self-signed ceritificate when keys are missing or invalid. + # Autogenerated with a self-signed certificate when keys are missing or invalid. tls.crt: tls.key: diff --git a/examples/dashboard.json b/examples/dashboard.json index acf4aed0b2087..be53aebaa0b9a 100644 --- a/examples/dashboard.json +++ b/examples/dashboard.json @@ -3146,7 +3146,7 @@ "timeFrom": null, "timeRegions": [], "timeShift": null, - "title": "Git Requets (ls-remote)", + "title": "Git Requests (ls-remote)", "tooltip": { "shared": true, "sort": 2, diff --git a/hack/gen-crd-spec/main.go b/hack/gen-crd-spec/main.go index 7331fa6045b75..83863584d0203 100644 --- a/hack/gen-crd-spec/main.go +++ b/hack/gen-crd-spec/main.go @@ -45,7 +45,7 @@ func getCustomResourceDefinitions() map[string]*extensionsobj.CustomResourceDefi // We need to completely remove validation of problematic fields such as creationTimestamp, // which get marshalled to `null`, but are typed as as a `string` during Open API validation - removeValidataion(un, "metadata.creationTimestamp") + removeValidation(un, "metadata.creationTimestamp") crd := toCRD(un) crd.Labels = map[string]string{ @@ -65,7 +65,7 @@ func deleteFile(path string) { checkErr(os.Remove(path)) } -func removeValidataion(un *unstructured.Unstructured, path string) { +func removeValidation(un *unstructured.Unstructured, path string) { schemaPath := []string{"spec", "validation", "openAPIV3Schema"} for _, part := range strings.Split(path, ".") { schemaPath = append(schemaPath, "properties", part) diff --git a/hack/generate-proto.sh b/hack/generate-proto.sh index 04c7a43db2098..08411590eafa9 100755 --- a/hack/generate-proto.sh +++ b/hack/generate-proto.sh @@ -21,7 +21,7 @@ MOD_ROOT=${GOPATH}/pkg/mod . ${PROJECT_ROOT}/hack/versions.sh -# protbuf tooling required to build .proto files from go annotations from k8s-like api types +# protobuf tooling required to build .proto files from go annotations from k8s-like api types go build -i -o dist/go-to-protobuf ./vendor/k8s.io/code-generator/cmd/go-to-protobuf go build -i -o dist/protoc-gen-gogo ./vendor/k8s.io/code-generator/cmd/go-to-protobuf/protoc-gen-gogo diff --git a/hack/git-ask-pass.sh b/hack/git-ask-pass.sh index cae31840ceb3d..4e34efe216c8a 100755 --- a/hack/git-ask-pass.sh +++ b/hack/git-ask-pass.sh @@ -1,5 +1,5 @@ #!/bin/sh -# This script is used as the commaned supplied to GIT_ASKPASS as a way to supply username/password +# This script is used as the command supplied to GIT_ASKPASS as a way to supply username/password # credentials to git, without having to use git credentials helpers, or having on-disk config. case "$1" in Username*) echo "${GIT_USERNAME}" ;; diff --git a/manifests/crds/application-crd.yaml b/manifests/crds/application-crd.yaml index 6e9c74d81343c..77a2da58a5eba 100644 --- a/manifests/crds/application-crd.yaml +++ b/manifests/crds/application-crd.yaml @@ -572,7 +572,7 @@ spec: type: boolean type: object syncOptions: - description: Options allow youe to specify whole app sync-options + description: Options allow you to specify whole app sync-options items: type: string type: array diff --git a/manifests/ha/install.yaml b/manifests/ha/install.yaml index b346b2d1e15d5..cc5cf3d016116 100644 --- a/manifests/ha/install.yaml +++ b/manifests/ha/install.yaml @@ -573,7 +573,7 @@ spec: type: boolean type: object syncOptions: - description: Options allow youe to specify whole app sync-options + description: Options allow you to specify whole app sync-options items: type: string type: array diff --git a/manifests/ha/namespace-install.yaml b/manifests/ha/namespace-install.yaml index 686880239a08a..c9d383bb829a7 100644 --- a/manifests/ha/namespace-install.yaml +++ b/manifests/ha/namespace-install.yaml @@ -573,7 +573,7 @@ spec: type: boolean type: object syncOptions: - description: Options allow youe to specify whole app sync-options + description: Options allow you to specify whole app sync-options items: type: string type: array diff --git a/manifests/install.yaml b/manifests/install.yaml index 5793cb3d4cd43..ab412d13c1d05 100644 --- a/manifests/install.yaml +++ b/manifests/install.yaml @@ -573,7 +573,7 @@ spec: type: boolean type: object syncOptions: - description: Options allow youe to specify whole app sync-options + description: Options allow you to specify whole app sync-options items: type: string type: array diff --git a/manifests/namespace-install.yaml b/manifests/namespace-install.yaml index 4e266d055ecea..7612b643a998e 100644 --- a/manifests/namespace-install.yaml +++ b/manifests/namespace-install.yaml @@ -573,7 +573,7 @@ spec: type: boolean type: object syncOptions: - description: Options allow youe to specify whole app sync-options + description: Options allow you to specify whole app sync-options items: type: string type: array diff --git a/pkg/apiclient/repocreds/repocreds.pb.go b/pkg/apiclient/repocreds/repocreds.pb.go index 5f1f4783e3f6d..fca5694aed683 100644 --- a/pkg/apiclient/repocreds/repocreds.pb.go +++ b/pkg/apiclient/repocreds/repocreds.pb.go @@ -130,7 +130,7 @@ func (m *RepoCredsDeleteRequest) GetUrl() string { return "" } -// RepoCredsResponse is a resonse to most repository credentials requests +// RepoCredsResponse is a response to most repository credentials requests type RepoCredsResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` diff --git a/pkg/apis/application/v1alpha1/generated.proto b/pkg/apis/application/v1alpha1/generated.proto index 6aa57e0325147..44741e1e9b363 100644 --- a/pkg/apis/application/v1alpha1/generated.proto +++ b/pkg/apis/application/v1alpha1/generated.proto @@ -913,7 +913,7 @@ message SyncPolicy { // Automated will keep an application synced to the target revision optional SyncPolicyAutomated automated = 1; - // Options allow youe to specify whole app sync-options + // Options allow you to specify whole app sync-options repeated string syncOptions = 2; } diff --git a/pkg/apis/application/v1alpha1/openapi_generated.go b/pkg/apis/application/v1alpha1/openapi_generated.go index 2865df885c998..7da34b7e8e2c3 100644 --- a/pkg/apis/application/v1alpha1/openapi_generated.go +++ b/pkg/apis/application/v1alpha1/openapi_generated.go @@ -3177,7 +3177,7 @@ func schema_pkg_apis_application_v1alpha1_SyncPolicy(ref common.ReferenceCallbac }, "syncOptions": { SchemaProps: spec.SchemaProps{ - Description: "Options allow youe to specify whole app sync-options", + Description: "Options allow you to specify whole app sync-options", Type: []string{"array"}, Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ diff --git a/pkg/apis/application/v1alpha1/types.go b/pkg/apis/application/v1alpha1/types.go index 03d312308ad7e..fea1afafcaf5f 100644 --- a/pkg/apis/application/v1alpha1/types.go +++ b/pkg/apis/application/v1alpha1/types.go @@ -109,7 +109,7 @@ func (e Env) Environ() []string { return environ } -// does an operation similar to `envstubst` tool, +// does an operation similar to `envsubst` tool, // but unlike envsubst it does not change missing names into empty string // see https://linux.die.net/man/1/envsubst func (e Env) Envsubst(s string) string { @@ -540,7 +540,7 @@ func (o SyncOptions) HasOption(option string) bool { type SyncPolicy struct { // Automated will keep an application synced to the target revision Automated *SyncPolicyAutomated `json:"automated,omitempty" protobuf:"bytes,1,opt,name=automated"` - // Options allow youe to specify whole app sync-options + // Options allow you to specify whole app sync-options SyncOptions SyncOptions `json:"syncOptions,omitempty" protobuf:"bytes,2,opt,name=syncOptions"` } diff --git a/reposerver/apiclient/clientset.go b/reposerver/apiclient/clientset.go index 05426de09f523..788363f8bded9 100644 --- a/reposerver/apiclient/clientset.go +++ b/reposerver/apiclient/clientset.go @@ -19,7 +19,7 @@ const ( MaxGRPCMessageSize = 100 * 1024 * 1024 ) -// Clientset represets repository server api clients +// Clientset represents repository server api clients type Clientset interface { NewRepoServerClient() (io.Closer, RepoServerServiceClient, error) } diff --git a/reposerver/apiclient/repository.pb.go b/reposerver/apiclient/repository.pb.go index 0ee78aa3fc822..1f9d36bebdd94 100644 --- a/reposerver/apiclient/repository.pb.go +++ b/reposerver/apiclient/repository.pb.go @@ -760,7 +760,7 @@ func (m *KustomizeAppSpec) GetImages() []string { type KsonnetEnvironment struct { // Name is the user defined name of an environment Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // KubernetesVersion is the kubernetes version the targetted cluster is running on. + // KubernetesVersion is the kubernetes version the targeted cluster is running on. K8SVersion string `protobuf:"bytes,2,opt,name=k8sVersion,proto3" json:"k8sVersion,omitempty"` // Destination stores the cluster address that this environment points to. Destination *KsonnetEnvironmentDestination `protobuf:"bytes,4,opt,name=destination,proto3" json:"destination,omitempty"` diff --git a/reposerver/repository/repository.proto b/reposerver/repository/repository.proto index 755fb370d750d..906622210291c 100644 --- a/reposerver/repository/repository.proto +++ b/reposerver/repository/repository.proto @@ -98,7 +98,7 @@ message KustomizeAppSpec { message KsonnetEnvironment { // Name is the user defined name of an environment string name = 1; - // KubernetesVersion is the kubernetes version the targetted cluster is running on. + // KubernetesVersion is the kubernetes version the targeted cluster is running on. string k8sVersion = 2; // Destination stores the cluster address that this environment points to. KsonnetEnvironmentDestination destination = 4; diff --git a/resource_customizations/networking.gke.io/ManagedCertificate/health.lua b/resource_customizations/networking.gke.io/ManagedCertificate/health.lua index 65338d5260ffc..9f0f3e127f3f0 100644 --- a/resource_customizations/networking.gke.io/ManagedCertificate/health.lua +++ b/resource_customizations/networking.gke.io/ManagedCertificate/health.lua @@ -14,7 +14,7 @@ end if obj.status ~= nil and obj.status.certificateStatus == "Active" then hs.status = "Healthy" - hs.message = "All ceritificates are active" + hs.message = "All certificates are active" return hs end diff --git a/resource_customizations/networking.gke.io/ManagedCertificate/health_test.yaml b/resource_customizations/networking.gke.io/ManagedCertificate/health_test.yaml index ba4a2afe1a386..5dbc1fb2025c7 100644 --- a/resource_customizations/networking.gke.io/ManagedCertificate/health_test.yaml +++ b/resource_customizations/networking.gke.io/ManagedCertificate/health_test.yaml @@ -9,5 +9,5 @@ tests: inputPath: testdata/failed.yaml - healthStatus: status: Healthy - message: "All ceritificates are active" + message: "All certificates are active" inputPath: testdata/active.yaml diff --git a/server/application/application.go b/server/application/application.go index 02e2c89a29b17..c988cf7856535 100644 --- a/server/application/application.go +++ b/server/application/application.go @@ -844,7 +844,7 @@ func (s *Server) PatchResource(ctx context.Context, q *application.ApplicationRe }, nil } -// DeleteResource deletes a specificed resource +// DeleteResource deletes a specified resource func (s *Server) DeleteResource(ctx context.Context, q *application.ApplicationResourceDeleteRequest) (*application.ApplicationResponse, error) { resourceRequest := &application.ApplicationResourceRequest{ Name: q.Name, diff --git a/server/project/project_test.go b/server/project/project_test.go index bf5b4ca2021e7..b9fe9f797f332 100644 --- a/server/project/project_test.go +++ b/server/project/project_test.go @@ -459,14 +459,14 @@ p, role:admin, projects, update, *, allow`) t.Run("TestAddWildcardSource", func(t *testing.T) { proj := existingProj.DeepCopy() - wildSouceRepo := "*" - proj.Spec.SourceRepos = append(proj.Spec.SourceRepos, wildSouceRepo) + wildSourceRepo := "*" + proj.Spec.SourceRepos = append(proj.Spec.SourceRepos, wildSourceRepo) projectServer := NewServer("default", fake.NewSimpleClientset(), apps.NewSimpleClientset(proj), enforcer, util.NewKeyLock(), nil, policyEnf) request := &project.ProjectUpdateRequest{Project: proj} updatedProj, err := projectServer.Update(context.Background(), request) assert.Nil(t, err) - assert.Equal(t, wildSouceRepo, updatedProj.Spec.SourceRepos[1]) + assert.Equal(t, wildSourceRepo, updatedProj.Spec.SourceRepos[1]) }) t.Run("TestCreateRolePolicySuccessfully", func(t *testing.T) { diff --git a/server/repocreds/repocreds.proto b/server/repocreds/repocreds.proto index 892db09836c54..5cbc510f41cb3 100644 --- a/server/repocreds/repocreds.proto +++ b/server/repocreds/repocreds.proto @@ -21,7 +21,7 @@ message RepoCredsDeleteRequest { string url = 1; } -// RepoCredsResponse is a resonse to most repository credentials requests +// RepoCredsResponse is a response to most repository credentials requests message RepoCredsResponse {} // RepoCreateRequest is a request for creating repository credentials config diff --git a/server/session/ratelimiter.go b/server/session/ratelimiter.go index f9aad2b2d3d80..ee3cc6d69bdef 100644 --- a/server/session/ratelimiter.go +++ b/server/session/ratelimiter.go @@ -52,7 +52,7 @@ func (redis *redisStateStorage) get(key string) (int, error) { } // NewLoginRateLimiter creates a function which enforces max number of concurrent login requests. -// Function returns closer that should be closed when loging request has completed or error if number +// Function returns closer that should be closed when logging request has completed or error if number // of incomplete requests exceeded max number. func NewLoginRateLimiter(storage stateStorage, maxNumber int) func() (util.Closer, error) { runLocked := func(callback func() error) error { diff --git a/sonar-project.properties b/sonar-project.properties index e8a64fa8b002e..fefa9eef518c7 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -16,7 +16,7 @@ sonar.host.url=https://sonarcloud.io # Exclude following set of patterns from coverage analysis sonar.coverage.exclusions=**/*.pb.go,**/*.pb.gw.go,**/mocks/**,**/*.ts*,**/vendor/**,**/openapi_generated.go,**/*_test.go,**/*_generated*,test/**,pkg/client/**,pkg/apiclient/** -# Exlcude following set of patterns from code analysis +# Exclude following set of patterns from code analysis sonar.go.exclusions=**/vendor/**,*/*.pb.go,**/*_test.go,**/*.pb.gw.go,**/mocks/**,**/openapi_generated.go,**/*_generated*.go # Exclude following set of patterns from duplication detection diff --git a/test/e2e/helm_test.go b/test/e2e/helm_test.go index c213205c42e0b..744a89aa82c85 100644 --- a/test/e2e/helm_test.go +++ b/test/e2e/helm_test.go @@ -225,7 +225,7 @@ func TestKubeVersion(t *testing.T) { And(func(app *Application) { kubeVersion := FailOnErr(Run(".", "kubectl", "-n", DeploymentNamespace(), "get", "cm", "my-map", "-o", "jsonpath={.data.kubeVersion}")).(string) - // Capabiliets.KubeVersion defaults to 1.9.0, we assume here you are running a later version + // Capabilities.KubeVersion defaults to 1.9.0, we assume here you are running a later version assert.Equal(t, GetVersions().ServerVersion.Format("v%s.%s.0"), kubeVersion) }) } diff --git a/test/e2e/selective_sync_test.go b/test/e2e/selective_sync_test.go index 8994e5ebc9dfa..f6e729a71cef6 100644 --- a/test/e2e/selective_sync_test.go +++ b/test/e2e/selective_sync_test.go @@ -10,7 +10,7 @@ import ( . "github.com/argoproj/argo-cd/test/e2e/fixture/app" ) -// when you selectively sync, only seleceted resources should be synced, but the app will be out of sync +// when you selectively sync, only selected resources should be synced, but the app will be out of sync func TestSelectiveSync(t *testing.T) { Given(t). Path("guestbook"). diff --git a/ui/src/app/login/components/login.scss b/ui/src/app/login/components/login.scss index eb10a6d86009d..1d6afbfbc69ec 100644 --- a/ui/src/app/login/components/login.scss +++ b/ui/src/app/login/components/login.scss @@ -47,7 +47,7 @@ $logoNegativePath: 'assets/images/argo.png'; padding: 20px 0 80px; } - &__box-outter { + &__box-outer { display: table-cell; vertical-align: middle; overflow: hidden; diff --git a/ui/src/app/settings/components/project-role-policies-edit/project-role-policies-edit.tsx b/ui/src/app/settings/components/project-role-policies-edit/project-role-policies-edit.tsx index 6c0f5ce68f1b3..ae425c64e8b1f 100644 --- a/ui/src/app/settings/components/project-role-policies-edit/project-role-policies-edit.tsx +++ b/ui/src/app/settings/components/project-role-policies-edit/project-role-policies-edit.tsx @@ -126,7 +126,7 @@ class PolicyWrapper extends React.Component { ) => { this.setPermission(e.target.value); }} @@ -175,7 +175,7 @@ class PolicyWrapper extends React.Component { this.props.fieldApi.setValue(fields.join()); } - private getPermision(): string { + private getPermission(): string { const fields = (this.props.fieldApi.getValue() as string).split(','); if (fields.length !== 6) { return ''; diff --git a/util/argo/argo_test.go b/util/argo/argo_test.go index cbcc8b5dff7a8..64923c2aefcf1 100644 --- a/util/argo/argo_test.go +++ b/util/argo/argo_test.go @@ -37,7 +37,7 @@ func TestRefreshApp(t *testing.T) { appIf := appClientset.ArgoprojV1alpha1().Applications("default") _, err := RefreshApp(appIf, "test-app", argoappv1.RefreshTypeNormal) assert.Nil(t, err) - // For some reason, the fake Application inferface doesn't reflect the patch status after Patch(), + // For some reason, the fake Application interface doesn't reflect the patch status after Patch(), // so can't verify it was set in unit tests. //_, ok := newApp.Annotations[common.AnnotationKeyRefresh] //assert.True(t, ok) @@ -111,7 +111,7 @@ func TestContainsSyncResource(t *testing.T) { for _, table := range tables { if out := ContainsSyncResource(table.u.GetName(), table.u.GroupVersionKind(), table.rr); out != table.expected { - t.Errorf("Expected %t for slice %+v conains resource %+v; instead got %t", table.expected, table.rr, table.u, out) + t.Errorf("Expected %t for slice %+v contains resource %+v; instead got %t", table.expected, table.rr, table.u, out) } } } @@ -525,7 +525,7 @@ func TestValidatePermissions(t *testing.T) { }, } db := &dbmocks.ArgoDB{} - db.On("GetCluster", context.Background(), spec.Destination.Server).Return(nil, fmt.Errorf("Unknown error occured")) + db.On("GetCluster", context.Background(), spec.Destination.Server).Return(nil, fmt.Errorf("Unknown error occurred")) _, err := ValidatePermissions(context.Background(), &spec, &proj, db) assert.Error(t, err) }) diff --git a/util/cache/redis_test.go b/util/cache/redis_test.go index ffaef23a0df92..2d4580cd64855 100644 --- a/util/cache/redis_test.go +++ b/util/cache/redis_test.go @@ -17,13 +17,13 @@ func TestRedisSetCache(t *testing.T) { defer mr.Close() assert.NotNil(t, mr) - t.Run("Successfull set", func(t *testing.T) { + t.Run("Successful set", func(t *testing.T) { client := NewRedisCache(redis.NewClient(&redis.Options{Addr: mr.Addr()}), 60*time.Second) err = client.Set(&Item{Key: "foo", Object: "bar"}) assert.NoError(t, err) }) - t.Run("Successfull get", func(t *testing.T) { + t.Run("Successful get", func(t *testing.T) { var res string client := NewRedisCache(redis.NewClient(&redis.Options{Addr: mr.Addr()}), 10*time.Second) err = client.Get("foo", &res) @@ -31,7 +31,7 @@ func TestRedisSetCache(t *testing.T) { assert.Equal(t, res, "bar") }) - t.Run("Successfull delete", func(t *testing.T) { + t.Run("Successful delete", func(t *testing.T) { client := NewRedisCache(redis.NewClient(&redis.Options{Addr: mr.Addr()}), 10*time.Second) err = client.Delete("foo") assert.NoError(t, err) diff --git a/util/cert/cert.go b/util/cert/cert.go index fc0ef52117a4f..3d874c26f9597 100644 --- a/util/cert/cert.go +++ b/util/cert/cert.go @@ -277,7 +277,7 @@ func MatchHostName(hostname, pattern string) bool { return match } -// Convinience wrapper around SSHFingerprintSHA256 +// Convenience wrapper around SSHFingerprintSHA256 func SSHFingerprintSHA256FromString(key string) string { pubKey, _, _, _, err := ssh.ParseAuthorizedKey([]byte(key)) if err != nil { diff --git a/util/cert/cert_test.go b/util/cert/cert_test.go index a2e8587917d14..a2d70ecb92a4b 100644 --- a/util/cert/cert_test.go +++ b/util/cert/cert_test.go @@ -455,7 +455,7 @@ func TestGetTLSCertificateDataPath(t *testing.T) { }) } -func TestGetSSHKnownHostseDataPath(t *testing.T) { +func TestGetSSHKnownHostsDataPath(t *testing.T) { t.Run("Get default path", func(t *testing.T) { os.Setenv(common.EnvVarSSHDataPath, "") p := GetSSHKnownHostsDataPath() diff --git a/util/db/db.go b/util/db/db.go index 52e1b4f025e69..8e263ddf6e3e6 100644 --- a/util/db/db.go +++ b/util/db/db.go @@ -47,7 +47,7 @@ type ArgoDB interface { // DeleteRepoCredentials deletes a repository credential set from config DeleteRepositoryCredentials(ctx context.Context, name string) error - // ListRepoCerticifates lists all configured certificates + // ListRepoCertificates lists all configured certificates ListRepoCertificates(ctx context.Context, selector *CertificateListSelector) (*appv1.RepositoryCertificateList, error) // CreateRepoCertificate creates a new certificate entry CreateRepoCertificate(ctx context.Context, certificate *appv1.RepositoryCertificateList, upsert bool) (*appv1.RepositoryCertificateList, error) diff --git a/util/kustomize/testdata/kustomization_yaml/kustomization.yaml b/util/kustomize/testdata/kustomization_yaml/kustomization.yaml index 24d406dcb1db0..5bd04f6a57566 100644 --- a/util/kustomize/testdata/kustomization_yaml/kustomization.yaml +++ b/util/kustomize/testdata/kustomization_yaml/kustomization.yaml @@ -1,3 +1,3 @@ resources: - ./deployment.yaml - - ./statefullset.yaml + - ./statefulset.yaml diff --git a/util/kustomize/testdata/kustomization_yaml/statefullset.yaml b/util/kustomize/testdata/kustomization_yaml/statefulset.yaml similarity index 100% rename from util/kustomize/testdata/kustomization_yaml/statefullset.yaml rename to util/kustomize/testdata/kustomization_yaml/statefulset.yaml diff --git a/util/rbac/rbac.go b/util/rbac/rbac.go index 0fdfc35edb9d0..19a0c15eaefcd 100644 --- a/util/rbac/rbac.go +++ b/util/rbac/rbac.go @@ -37,7 +37,7 @@ const ( // * is backed by a kubernetes config map // * has a predefined RBAC model // * supports a built-in policy -// * supports a user-defined bolicy +// * supports a user-defined policy // * supports a custom JWT claims enforce function type Enforcer struct { *casbin.Enforcer diff --git a/util/session/sessionmanager_test.go b/util/session/sessionmanager_test.go index 847d4193ef3a7..d902e79eacc51 100644 --- a/util/session/sessionmanager_test.go +++ b/util/session/sessionmanager_test.go @@ -270,7 +270,7 @@ func TestLoginRateLimiter(t *testing.T) { } storage.attempts = map[string]LoginAttempts{} - // Failed counter should have been reseted, should validate immediately + // Failed counter should have been reset, should validate immediately { err := mgr.VerifyUsernamePassword("admin", "password") assert.NoError(t, err) diff --git a/util/settings/settings_test.go b/util/settings/settings_test.go index d9ded060c0f77..f5f097aa3670e 100644 --- a/util/settings/settings_test.go +++ b/util/settings/settings_test.go @@ -66,7 +66,7 @@ func TestSaveRepositories(t *testing.T) { assert.ElementsMatch(t, repos, []Repository{{URL: "http://foo"}}) } -func TestSaveRepositoresNoConfigMap(t *testing.T) { +func TestSaveRepositoriesNoConfigMap(t *testing.T) { kubeClient := fake.NewSimpleClientset() settingsManager := NewSettingsManager(context.Background(), kubeClient, "default") diff --git a/util/tls/tls.go b/util/tls/tls.go index 8f28627608307..aab5dd4f2ecae 100644 --- a/util/tls/tls.go +++ b/util/tls/tls.go @@ -79,7 +79,7 @@ func getTLSVersionByString(version string) (uint16, error) { return 0, fmt.Errorf("%s is not valid TLS version", version) } -// Parse colon seperated string representation of TLS cipher suites into array of values usable by crypto/tls +// Parse colon separated string representation of TLS cipher suites into array of values usable by crypto/tls func getTLSCipherSuitesByString(cipherSuites string) ([]uint16, error) { suiteMap := make(map[string]uint16) for _, s := range tls.CipherSuites() {