diff --git a/.golangci.yml b/.golangci.yml index 5f7e34de8..82b300ef4 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -12,3 +12,6 @@ linters: - goconst - goimports - unused + - varcheck + - deadcode + - misspell diff --git a/cmd/virtual-kubelet/internal/commands/root/tracing_register.go b/cmd/virtual-kubelet/internal/commands/root/tracing_register.go index b726cc993..a183126ac 100644 --- a/cmd/virtual-kubelet/internal/commands/root/tracing_register.go +++ b/cmd/virtual-kubelet/internal/commands/root/tracing_register.go @@ -29,7 +29,7 @@ var ( ) // TracingExporterInitFunc is the function that is called to initialize an exporter. -// This is used when registering an exporter and called when a user specifed they want to use the exporter. +// This is used when registering an exporter and called when a user specified they want to use the exporter. type TracingExporterInitFunc func(TracingExporterOptions) (trace.Exporter, error) // RegisterTracingExporter registers a tracing exporter. diff --git a/node/env_internal_test.go b/node/env_internal_test.go index cf9cf9a91..bf472383b 100644 --- a/node/env_internal_test.go +++ b/node/env_internal_test.go @@ -663,7 +663,7 @@ func TestEnvFromConfigMapAndSecretWithInvalidKeys(t *testing.T) { } // TestEnvOverridesEnvFrom populates the environment of a container from a configmap, and from another configmap's key with a "conflicting" key. -// Then, it checks that the value of the "conflicting" key has been correctly overriden. +// Then, it checks that the value of the "conflicting" key has been correctly overridden. func TestEnvOverridesEnvFrom(t *testing.T) { rm := testutil.FakeResourceManager(configMap3) er := testutil.FakeEventRecorder(defaultEventRecorderBufferSize) @@ -672,7 +672,7 @@ func TestEnvOverridesEnvFrom(t *testing.T) { override := "__override__" // Create a pod object having a single container. - // The container's environment is to be populated from a configmap, and later overriden with a value provided directly. + // The container's environment is to be populated from a configmap, and later overridden with a value provided directly. pod := &corev1.Pod{ ObjectMeta: metav1.ObjectMeta{ Namespace: namespace, diff --git a/node/pod_test.go b/node/pod_test.go index 4994dc9c0..f4700ccae 100644 --- a/node/pod_test.go +++ b/node/pod_test.go @@ -303,7 +303,7 @@ func TestFetchPodStatusFromProviderWithExpiredPod(t *testing.T) { pod.Status.Phase = corev1.PodRunning containerStatus := corev1.ContainerStatus{} - // We should terminate containters in a pod that has not provided pod status update for more than a minute + // We should terminate containers in a pod that has not provided pod status update for more than a minute startedAt := time.Now().Add(-(time.Minute + time.Second)) containerStatus.State.Running = &corev1.ContainerStateRunning{StartedAt: metav1.NewTime(startedAt)} pod.ObjectMeta.CreationTimestamp.Time = startedAt