Merge pull request #772 from sargun/add-linters

Add varcheck, deadcode, and mispell linters
This commit is contained in:
Brian Goff
2019-09-26 21:47:02 -07:00
committed by GitHub
4 changed files with 7 additions and 4 deletions

View File

@@ -12,3 +12,6 @@ linters:
- goconst
- goimports
- unused
- varcheck
- deadcode
- misspell

View File

@@ -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.

View File

@@ -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,

View File

@@ -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