Skip to content

Commit 14ccac5

Browse files
bendorytekton-robot
authored andcommitted
Clenaup: delete duplicate words.
There are no expected functional changes in this PR. The code changes are duplicate words discovered by the `dupword` linter, for example, `the the` --> `the`. Occasional deduped words appear in unit test strings where I've uniqified the words in question. The `dupword` linter will be enabled in tektoncd#5918. Context: tektoncd#5899 /kind cleanup
1 parent 55d6682 commit 14ccac5

20 files changed

+32
-33
lines changed

cmd/entrypoint/runner.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (rr *realRunner) Run(ctx context.Context, args ...string) error {
8585
cmd := exec.CommandContext(ctx, name, args...)
8686

8787
// Build a list of tee readers that we'll read from after the command is
88-
// is started. If we are not configured to tee stdout/stderr this will be
88+
// started. If we are not configured to tee stdout/stderr this will be
8989
// empty and contents will not be copied.
9090
var readers []*namedReader
9191
if rr.stdoutPath != "" {

pkg/apis/pipeline/v1/pipelinerun_types.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,15 @@ func (pr *PipelineRun) IsGracefullyStopped() bool {
9898
return pr.Spec.Status == PipelineRunSpecStatusStoppedRunFinally
9999
}
100100

101-
// PipelineTimeout returns the the applicable timeout for the PipelineRun
101+
// PipelineTimeout returns the applicable timeout for the PipelineRun
102102
func (pr *PipelineRun) PipelineTimeout(ctx context.Context) time.Duration {
103103
if pr.Spec.Timeouts != nil && pr.Spec.Timeouts.Pipeline != nil {
104104
return pr.Spec.Timeouts.Pipeline.Duration
105105
}
106106
return time.Duration(config.FromContextOrDefaults(ctx).Defaults.DefaultTimeoutMinutes) * time.Minute
107107
}
108108

109-
// TasksTimeout returns the the tasks timeout for the PipelineRun, if set,
109+
// TasksTimeout returns the tasks timeout for the PipelineRun, if set,
110110
// or the tasks timeout computed from the Pipeline and Finally timeouts, if those are set.
111111
func (pr *PipelineRun) TasksTimeout() *metav1.Duration {
112112
t := pr.Spec.Timeouts
@@ -125,7 +125,7 @@ func (pr *PipelineRun) TasksTimeout() *metav1.Duration {
125125
return nil
126126
}
127127

128-
// FinallyTimeout returns the the finally timeout for the PipelineRun, if set,
128+
// FinallyTimeout returns the finally timeout for the PipelineRun, if set,
129129
// or the finally timeout computed from the Pipeline and Tasks timeouts, if those are set.
130130
func (pr *PipelineRun) FinallyTimeout() *metav1.Duration {
131131
t := pr.Spec.Timeouts

pkg/apis/pipeline/v1/result_validation.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"knative.dev/pkg/apis"
2424
)
2525

26-
// ResultNameFormat Constant used to define the the regex Result.Name should follow
26+
// ResultNameFormat Constant used to define the regex Result.Name should follow
2727
const ResultNameFormat = `^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`
2828

2929
var resultNameFormatRegex = regexp.MustCompile(ResultNameFormat)

pkg/apis/pipeline/v1beta1/pipelinerun_types.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func (pr *PipelineRun) IsGracefullyStopped() bool {
9797
return pr.Spec.Status == PipelineRunSpecStatusStoppedRunFinally
9898
}
9999

100-
// PipelineTimeout returns the the applicable timeout for the PipelineRun
100+
// PipelineTimeout returns the applicable timeout for the PipelineRun
101101
func (pr *PipelineRun) PipelineTimeout(ctx context.Context) time.Duration {
102102
if pr.Spec.Timeout != nil {
103103
return pr.Spec.Timeout.Duration
@@ -108,7 +108,7 @@ func (pr *PipelineRun) PipelineTimeout(ctx context.Context) time.Duration {
108108
return time.Duration(config.FromContextOrDefaults(ctx).Defaults.DefaultTimeoutMinutes) * time.Minute
109109
}
110110

111-
// TasksTimeout returns the the tasks timeout for the PipelineRun, if set,
111+
// TasksTimeout returns the tasks timeout for the PipelineRun, if set,
112112
// or the tasks timeout computed from the Pipeline and Finally timeouts, if those are set.
113113
func (pr *PipelineRun) TasksTimeout() *metav1.Duration {
114114
t := pr.Spec.Timeouts
@@ -127,7 +127,7 @@ func (pr *PipelineRun) TasksTimeout() *metav1.Duration {
127127
return nil
128128
}
129129

130-
// FinallyTimeout returns the the finally timeout for the PipelineRun, if set,
130+
// FinallyTimeout returns the finally timeout for the PipelineRun, if set,
131131
// or the finally timeout computed from the Pipeline and Tasks timeouts, if those are set.
132132
func (pr *PipelineRun) FinallyTimeout() *metav1.Duration {
133133
t := pr.Spec.Timeouts

pkg/apis/pipeline/v1beta1/resultref.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const (
5151
exactVariableSubstitutionFormat = `^\$\([_a-zA-Z0-9.-]+(\.[_a-zA-Z0-9.-]+)*(\[([0-9]+|\*)\])?\)$`
5252
// arrayIndexing will match all `[int]` and `[*]` for parseExpression
5353
arrayIndexing = `\[([0-9])*\*?\]`
54-
// ResultNameFormat Constant used to define the the regex Result.Name should follow
54+
// ResultNameFormat Constant used to define the regex Result.Name should follow
5555
ResultNameFormat = `^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`
5656
)
5757

pkg/apis/pipeline/v1beta1/taskrun_types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ type TaskRunStatus struct {
142142
TaskRunStatusFields `json:",inline"`
143143
}
144144

145-
// TaskRunConditionType is an enum used to store TaskRun custom conditions
145+
// TaskRunConditionType is an enum used to store TaskRun custom
146146
// conditions such as one used in spire results verification
147147
type TaskRunConditionType string
148148

pkg/apis/resolution/v1alpha1/resolution_request_validation.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func (rr *ResolutionRequest) Validate(ctx context.Context) (errs *apis.FieldErro
3030
return errs.Also(rr.Spec.Validate(ctx).ViaField("spec"))
3131
}
3232

33-
// Validate checks the the spec field of a ResolutionRequest is valid.
33+
// Validate checks the spec field of a ResolutionRequest is valid.
3434
func (rs *ResolutionRequestSpec) Validate(ctx context.Context) (errs *apis.FieldError) {
3535
return nil
3636
}

pkg/apis/resolution/v1beta1/resolution_request_validation.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func (rr *ResolutionRequest) Validate(ctx context.Context) (errs *apis.FieldErro
3030
return errs.Also(rr.Spec.Validate(ctx).ViaField("spec"))
3131
}
3232

33-
// Validate checks the the spec field of a ResolutionRequest is valid.
33+
// Validate checks the spec field of a ResolutionRequest is valid.
3434
func (rs *ResolutionRequestSpec) Validate(ctx context.Context) (errs *apis.FieldError) {
3535
return nil
3636
}

pkg/artifacts/artifacts_storage.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func CleanupArtifactStorage(ctx context.Context, pr *v1beta1.PipelineRun, c kube
128128
return nil
129129
}
130130

131-
// needsPVC checks if the Tekton is is configured to use a bucket for artifact storage,
131+
// needsPVC checks if the Tekton is configured to use a bucket for artifact storage,
132132
// returning true if instead a PVC is needed.
133133
func needsPVC(ctx context.Context) bool {
134134
bucketConfig := config.FromContextOrDefaults(ctx).ArtifactBucket

pkg/names/generate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
// NameGenerator generates names for objects. Some backends may have more information
2727
// available to guide selection of new names and this interface hides those details.
2828
type NameGenerator interface {
29-
// RestrictLengthWithRandomSuffix generates a valid name from the base name, adding a random suffix to the
29+
// RestrictLengthWithRandomSuffix generates a valid name from the base name, adding a random suffix to
3030
// the base. If base is valid, the returned name must also be valid. The generator is
3131
// responsible for knowing the maximum valid name length.
3232
RestrictLengthWithRandomSuffix(base string) string

pkg/reconciler/pipelinerun/pipelinerun.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ func (c *Reconciler) resolvePipelineState(
318318
return nil, err
319319
}
320320
// If we just return c.customRunLister.CustomRuns(...).Get(...) and there is no run, we end up returning
321-
// a v1beta1.RunObject that that won't == nil, so do an explicit check.
321+
// a v1beta1.RunObject that won't == nil, so do an explicit check.
322322
if r == nil {
323323
return nil, nil
324324
}
@@ -333,7 +333,7 @@ func (c *Reconciler) resolvePipelineState(
333333
return nil, err
334334
}
335335
// If we just return c.runLister.Runs(...).Get(...) and there is no run, we end up returning
336-
// a v1beta1.RunObject that that won't == nil, so do an explicit check.
336+
// a v1beta1.RunObject that won't == nil, so do an explicit check.
337337
if r == nil {
338338
return nil, nil
339339
}

pkg/reconciler/pipelinerun/resources/pipelinerunresolution.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ func (t *ResolvedPipelineTask) skipBecauseResultReferencesAreMissing(facts *Pipe
472472
func (t *ResolvedPipelineTask) skipBecausePipelineRunPipelineTimeoutReached(facts *PipelineRunFacts) bool {
473473
if t.checkParentsDone(facts) {
474474
if facts.TimeoutsState.PipelineTimeout != nil && *facts.TimeoutsState.PipelineTimeout != config.NoTimeoutDuration && facts.TimeoutsState.StartTime != nil {
475-
// If the elapsed time since the PipelineRun's start time is greater than the the PipelineRun's Pipeline timeout, skip.
475+
// If the elapsed time since the PipelineRun's start time is greater than the PipelineRun's Pipeline timeout, skip.
476476
return facts.TimeoutsState.Clock.Since(*facts.TimeoutsState.StartTime) > *facts.TimeoutsState.PipelineTimeout
477477
}
478478
}
@@ -485,7 +485,7 @@ func (t *ResolvedPipelineTask) skipBecausePipelineRunPipelineTimeoutReached(fact
485485
func (t *ResolvedPipelineTask) skipBecausePipelineRunTasksTimeoutReached(facts *PipelineRunFacts) bool {
486486
if t.checkParentsDone(facts) && !t.IsFinalTask(facts) {
487487
if facts.TimeoutsState.TasksTimeout != nil && *facts.TimeoutsState.TasksTimeout != config.NoTimeoutDuration && facts.TimeoutsState.StartTime != nil {
488-
// If the elapsed time since the PipelineRun's start time is greater than the the PipelineRun's Tasks timeout, skip.
488+
// If the elapsed time since the PipelineRun's start time is greater than the PipelineRun's Tasks timeout, skip.
489489
return facts.TimeoutsState.Clock.Since(*facts.TimeoutsState.StartTime) > *facts.TimeoutsState.TasksTimeout
490490
}
491491
}
@@ -498,7 +498,7 @@ func (t *ResolvedPipelineTask) skipBecausePipelineRunTasksTimeoutReached(facts *
498498
func (t *ResolvedPipelineTask) skipBecausePipelineRunFinallyTimeoutReached(facts *PipelineRunFacts) bool {
499499
if t.checkParentsDone(facts) && t.IsFinalTask(facts) {
500500
if facts.TimeoutsState.FinallyTimeout != nil && *facts.TimeoutsState.FinallyTimeout != config.NoTimeoutDuration && facts.TimeoutsState.FinallyStartTime != nil {
501-
// If the elapsed time since the PipelineRun's finally start time is greater than the the PipelineRun's finally timeout, skip.
501+
// If the elapsed time since the PipelineRun's finally start time is greater than the PipelineRun's finally timeout, skip.
502502
return facts.TimeoutsState.Clock.Since(*facts.TimeoutsState.FinallyStartTime) > *facts.TimeoutsState.FinallyTimeout
503503
}
504504
}

pkg/reconciler/pipelinerun/resources/pipelinerunresolution_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2195,10 +2195,10 @@ func TestResolvePipelineRun_PipelineTaskHasNoResources(t *testing.T) {
21952195
Outputs: map[string]*resourcev1alpha1.PipelineResource{},
21962196
}
21972197
if d := cmp.Diff(pipelineState[0].ResolvedTaskResources, expectedTaskResources, cmpopts.IgnoreUnexported(v1beta1.TaskRunSpec{})); d != "" {
2198-
t.Fatalf("Expected resources where only Tasks were resolved but but actual differed %s", diff.PrintWantGot(d))
2198+
t.Fatalf("Expected resources where only Tasks were resolved but actual differed %s", diff.PrintWantGot(d))
21992199
}
22002200
if d := cmp.Diff(pipelineState[1].ResolvedTaskResources, expectedTaskResources, cmpopts.IgnoreUnexported(v1beta1.TaskRunSpec{})); d != "" {
2201-
t.Fatalf("Expected resources where only Tasks were resolved but but actual differed %s", diff.PrintWantGot(d))
2201+
t.Fatalf("Expected resources where only Tasks were resolved but actual differed %s", diff.PrintWantGot(d))
22022202
}
22032203
}
22042204

pkg/reconciler/testing/logger.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ func SetupDefaultContext(t *testing.T) (context.Context, []controller.Informer)
4141
return WithLogger(ctx, t), informer
4242
}
4343

44-
// WithLogger returns the the Logger
44+
// WithLogger returns the Logger
4545
func WithLogger(ctx context.Context, t *testing.T) context.Context {
4646
return logging.WithLogger(ctx, TestLogger(t))
4747
}
4848

49-
// TestLogger sets up the the Logger
49+
// TestLogger sets up the Logger
5050
func TestLogger(t *testing.T) *zap.SugaredLogger {
5151
logger := zaptest.NewLogger(t, zaptest.WrapOptions(zap.AddCaller()))
5252
return logger.Sugar().Named(t.Name())

pkg/spire/spire.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const (
5252
KeyResultManifest = "RESULT_MANIFEST"
5353
// WorkloadAPI is the name of the SPIFFE/SPIRE CSI Driver volume
5454
WorkloadAPI = "spiffe-workload-api"
55-
// VolumeMountPath is the volume mount in the the pods to access the SPIFFE/SPIRE agent workload API
55+
// VolumeMountPath is the volume mount in the pods to access the SPIFFE/SPIRE agent workload API
5656
VolumeMountPath = "/spiffe-workload-api"
5757
)
5858

pkg/substitution/substitution_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -370,17 +370,17 @@ func TestApplyReplacements(t *testing.T) {
370370
name: "single replacement requested multiple matches",
371371
args: args{
372372
input: "this $(is) a string $(is) a string",
373-
replacements: map[string]string{"is": "a"},
373+
replacements: map[string]string{"is": "foo"},
374374
},
375-
expectedOutput: "this a a string a a string",
375+
expectedOutput: "this foo a string foo a string",
376376
},
377377
{
378378
name: "multiple replacements requested",
379379
args: args{
380380
input: "this $(is) a $(string) $(is) a $(string)",
381-
replacements: map[string]string{"is": "a", "string": "sstring"},
381+
replacements: map[string]string{"is": "foo", "string": "sstring"},
382382
},
383-
expectedOutput: "this a a sstring a a sstring",
383+
expectedOutput: "this foo a sstring foo a sstring",
384384
},
385385
{
386386
name: "multiple replacements requested nothing replaced",

test/custom_task_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ func WaitForRunSpecCancelled(ctx context.Context, c *clients, name string, desc
278278
}
279279

280280
// TestPipelineRunCustomTaskTimeout is an integration test that will
281-
// verify that pipelinerun timeout works and leads to the the correct Run Spec.status
281+
// verify that pipelinerun timeout works and leads to the correct Run Spec.status
282282
func TestPipelineRunCustomTaskTimeout(t *testing.T) {
283283
// cancel the context after we have waited a suitable buffer beyond the given deadline.
284284
ctx, cancel := context.WithTimeout(context.Background(), timeout+2*time.Minute)

test/pullrequest/http.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func reflect(w http.ResponseWriter, r *http.Request) {
2929

3030
// ServeHTTP serves the proxy HTTP handler. Any POST requests will reflect
3131
// provided data back to the client, any other methods will attempt to read
32-
// an HTTP response from from <data dir>/<url path>/<method>, e.g.
32+
// an HTTP response from <data dir>/<url path>/<method>, e.g.
3333
// testdata/github.com/foo/bar/GET.
3434
// The server will also check headers provided by the client. If they do not
3535
// match, an error is returned (this is useful for verifying auth headers are

test/resolvers_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ spec:
236236
value: /task/git-clone/0.7/git-clone.yaml
237237
- name: revision
238238
value: main
239-
params:
240239
params:
241240
- name: url
242241
value: https://github.com/tektoncd/pipeline

test/timeout_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import (
3939
)
4040

4141
// TestPipelineRunTimeout is an integration test that will
42-
// verify that pipelinerun timeout works and leads to the the correct TaskRun statuses
42+
// verify that pipelinerun timeout works and leads to the correct TaskRun statuses
4343
// and pod deletions.
4444
func TestPipelineRunTimeout(t *testing.T) {
4545
t.Parallel()
@@ -432,7 +432,7 @@ spec:
432432
}
433433

434434
// TestPipelineRunTasksTimeout is an integration test that will
435-
// verify that pipelinerun tasksTimeout works and leads to the the correct PipelineRun and TaskRun statuses
435+
// verify that pipelinerun tasksTimeout works and leads to the correct PipelineRun and TaskRun statuses
436436
// and pod deletions.
437437
func TestPipelineRunTasksTimeout(t *testing.T) {
438438
t.Parallel()

0 commit comments

Comments
 (0)