Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump github.com/golangci/golangci-lint from 1.60.3 to 1.61.0 in /tools #8254

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cmd/entrypoint/subcommands/subcommands.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ func Process(args []string) error {
return OK{message: "Decoded script " + src}
}
case StepInitCommand:
//nolint: gosec
if err := stepInit(args[1:]); err != nil {
return SubcommandError{subcommand: StepInitCommand, message: err.Error()}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/config/feature_flags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ func TestNewFeatureFlagsConfigMapErrors(t *testing.T) {
}

func TestGetVerificationNoMatchPolicy(t *testing.T) {
ctx := context.Background()
tcs := []struct {
name, noMatchPolicy, expected string
}{{
Expand All @@ -351,6 +350,7 @@ func TestGetVerificationNoMatchPolicy(t *testing.T) {

for _, tc := range tcs {
t.Run(tc.name, func(t *testing.T) {
ctx := context.Background()
store := config.NewStore(logging.FromContext(ctx).Named("config-store"))
featureflags := &corev1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{
Expand Down
4 changes: 2 additions & 2 deletions pkg/pod/creds_init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ func TestCredsInit(t *testing.T) {
eventObj := &corev1.Event{}
kubeclient := fakek8s.NewSimpleClientset(c.objs...)
recorder := record.NewFakeRecorder(1000)
c.ctx = controller.WithEventRecorder(c.ctx, recorder)
args, volumes, volumeMounts, err := credsInit(c.ctx, eventObj, serviceAccountName, namespace, kubeclient)
ctx := controller.WithEventRecorder(c.ctx, recorder)
args, volumes, volumeMounts, err := credsInit(ctx, eventObj, serviceAccountName, namespace, kubeclient)
if err != nil {
t.Fatalf("credsInit: %v", err)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/pod/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func (b *Builder) Build(ctx context.Context, taskRun *v1.TaskRun, taskSpec v1.Ta
// Each step should only mount their own volume as RW,
// all other steps should be mounted RO.
volumes = append(volumes, runVolume(i))
for j := range len(stepContainers) {
for j := range stepContainers {
s.VolumeMounts = append(s.VolumeMounts, runMount(j, i != j))
}

Expand All @@ -362,7 +362,7 @@ func (b *Builder) Build(ctx context.Context, taskRun *v1.TaskRun, taskSpec v1.Ta
if s.Name != pipeline.ReservedResultsSidecarName {
continue
}
for j := range len(stepContainers) {
for j := range stepContainers {
s.VolumeMounts = append(s.VolumeMounts, runMount(j, true))
}
requestedVolumeMounts := map[string]bool{}
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/events/k8sevent/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func eventsFromChannel(c chan string, wantEvents []string) error {
// on the channel forever if fewer than expected events are received
timer := time.After(wait.ForeverTestTimeout)
foundEvents := []string{}
for ii := range len(wantEvents) {
for ii := range wantEvents {
// We loop over all the events that we expect. Once they are all received
// we exit the loop. If we never receive enough events, the timeout takes us
// out of the loop.
Expand Down
12 changes: 5 additions & 7 deletions pkg/reconciler/pipelinerun/resources/pipelineref_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ func TestGetPipelineFunc_V1beta1Pipeline_VerifyNoError(t *testing.T) {
}
for _, tc := range testcases {
t.Run(tc.name, func(t *testing.T) {
ctx = test.SetupTrustedResourceConfig(ctx, tc.verificationNoMatchPolicy)
ctx := test.SetupTrustedResourceConfig(context.Background(), tc.verificationNoMatchPolicy)
fn := resources.GetPipelineFunc(ctx, k8sclient, tektonclient, tc.requester, &tc.pipelinerun, tc.policies)

gotResolvedPipeline, gotSource, gotVerificationResult, err := fn(ctx, pipelineRef.Name)
Expand All @@ -768,7 +768,6 @@ func TestGetPipelineFunc_V1beta1Pipeline_VerifyNoError(t *testing.T) {
}

func TestGetPipelineFunc_V1beta1Pipeline_VerifyError(t *testing.T) {
ctx := context.Background()
tektonclient := fake.NewSimpleClientset()
signer, _, k8sclient, vps := test.SetupVerificationPolicies(t)

Expand Down Expand Up @@ -863,7 +862,7 @@ func TestGetPipelineFunc_V1beta1Pipeline_VerifyError(t *testing.T) {
}
for _, tc := range testcases {
t.Run(tc.name, func(t *testing.T) {
ctx = test.SetupTrustedResourceConfig(ctx, tc.verificationNoMatchPolicy)
ctx := test.SetupTrustedResourceConfig(context.Background(), tc.verificationNoMatchPolicy)
pr := &v1.PipelineRun{
ObjectMeta: metav1.ObjectMeta{Namespace: "trusted-resources"},
Spec: v1.PipelineRunSpec{
Expand Down Expand Up @@ -1072,7 +1071,7 @@ func TestGetPipelineFunc_V1Pipeline_VerifyNoError(t *testing.T) {
}
for _, tc := range testcases {
t.Run(tc.name, func(t *testing.T) {
ctx = test.SetupTrustedResourceConfig(ctx, tc.verificationNoMatchPolicy)
ctx := test.SetupTrustedResourceConfig(context.Background(), tc.verificationNoMatchPolicy)
fn := resources.GetPipelineFunc(ctx, k8sclient, tektonclient, tc.requester, &tc.pipelinerun, tc.policies)

gotResolvedPipeline, gotSource, gotVerificationResult, err := fn(ctx, pipelineRef.Name)
Expand All @@ -1099,7 +1098,6 @@ func TestGetPipelineFunc_V1Pipeline_VerifyNoError(t *testing.T) {
}

func TestGetPipelineFunc_V1Pipeline_VerifyError(t *testing.T) {
ctx := context.Background()
tektonclient := fake.NewSimpleClientset()
signer, _, k8sclient, vps := test.SetupVerificationPolicies(t)

Expand Down Expand Up @@ -1193,7 +1191,7 @@ func TestGetPipelineFunc_V1Pipeline_VerifyError(t *testing.T) {
}
for _, tc := range testcases {
t.Run(tc.name, func(t *testing.T) {
ctx = test.SetupTrustedResourceConfig(ctx, tc.verificationNoMatchPolicy)
ctx := test.SetupTrustedResourceConfig(context.Background(), tc.verificationNoMatchPolicy)
pr := &v1.PipelineRun{
ObjectMeta: metav1.ObjectMeta{Namespace: "trusted-resources"},
Spec: v1.PipelineRunSpec{
Expand All @@ -1215,7 +1213,6 @@ func TestGetPipelineFunc_V1Pipeline_VerifyError(t *testing.T) {
}

func TestGetPipelineFunc_GetFuncError(t *testing.T) {
ctx := context.Background()
tektonclient := fake.NewSimpleClientset()
_, k8sclient, vps := test.SetupMatchAllVerificationPolicies(t, "trusted-resources")

Expand Down Expand Up @@ -1259,6 +1256,7 @@ func TestGetPipelineFunc_GetFuncError(t *testing.T) {
}
for _, tc := range testcases {
t.Run(tc.name, func(t *testing.T) {
ctx := context.Background()
store := config.NewStore(logging.FromContext(ctx).Named("config-store"))
featureflags := &corev1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{
Expand Down
10 changes: 5 additions & 5 deletions pkg/reconciler/taskrun/resources/taskref_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1430,7 +1430,7 @@ func TestGetTaskFunc_V1beta1Task_VerifyNoError(t *testing.T) {
}
for _, tc := range testcases {
t.Run(tc.name, func(t *testing.T) {
ctx = test.SetupTrustedResourceConfig(ctx, tc.verificationNoMatchPolicy)
ctx := test.SetupTrustedResourceConfig(context.Background(), tc.verificationNoMatchPolicy)
tr := &v1.TaskRun{
ObjectMeta: metav1.ObjectMeta{Namespace: "trusted-resources"},
Spec: v1.TaskRunSpec{
Expand Down Expand Up @@ -1558,7 +1558,7 @@ func TestGetTaskFunc_V1beta1Task_VerifyError(t *testing.T) {
}
for _, tc := range testcases {
t.Run(tc.name, func(t *testing.T) {
ctx = test.SetupTrustedResourceConfig(ctx, tc.verificationNoMatchPolicy)
ctx := test.SetupTrustedResourceConfig(ctx, tc.verificationNoMatchPolicy)
tr := &v1.TaskRun{
ObjectMeta: metav1.ObjectMeta{Namespace: "trusted-resources"},
Spec: v1.TaskRunSpec{
Expand Down Expand Up @@ -1694,7 +1694,7 @@ func TestGetTaskFunc_V1Task_VerifyNoError(t *testing.T) {
}
for _, tc := range testcases {
t.Run(tc.name, func(t *testing.T) {
ctx = test.SetupTrustedResourceConfig(ctx, tc.verificationNoMatchPolicy)
ctx := test.SetupTrustedResourceConfig(ctx, tc.verificationNoMatchPolicy)
tr := &v1.TaskRun{
ObjectMeta: metav1.ObjectMeta{Namespace: "trusted-resources"},
Spec: v1.TaskRunSpec{
Expand Down Expand Up @@ -1820,7 +1820,7 @@ func TestGetTaskFunc_V1Task_VerifyError(t *testing.T) {
}
for _, tc := range testcases {
t.Run(tc.name, func(t *testing.T) {
ctx = test.SetupTrustedResourceConfig(ctx, tc.verificationNoMatchPolicy)
ctx := test.SetupTrustedResourceConfig(ctx, tc.verificationNoMatchPolicy)
tr := &v1.TaskRun{
ObjectMeta: metav1.ObjectMeta{Namespace: "trusted-resources"},
Spec: v1.TaskRunSpec{
Expand Down Expand Up @@ -1892,7 +1892,7 @@ func TestGetTaskFunc_GetFuncError(t *testing.T) {
},
}
store.OnConfigChanged(featureflags)
ctx = store.ToContext(ctx)
ctx := store.ToContext(ctx)

fn := resources.GetTaskFunc(ctx, k8sclient, tektonclient, tc.requester, &tc.taskrun, tc.taskrun.Spec.TaskRef, "", "default", "default", vps)

Expand Down
32 changes: 16 additions & 16 deletions tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ go 1.22.1

toolchain go1.22.5

require github.com/golangci/golangci-lint v1.60.3
require github.com/golangci/golangci-lint v1.61.0

require (
4d63.com/gocheckcompilerdirectives v1.2.1 // indirect
4d63.com/gochecknoglobals v0.2.1 // indirect
github.com/4meepo/tagalign v1.3.4 // indirect
github.com/Abirdcfly/dupword v0.0.14 // indirect
github.com/Abirdcfly/dupword v0.1.1 // indirect
github.com/Antonboom/errname v0.1.13 // indirect
github.com/Antonboom/nilnil v0.1.9 // indirect
github.com/Antonboom/testifylint v1.4.3 // indirect
github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect
github.com/Crocmagnon/fatcontext v0.4.0 // indirect
github.com/Crocmagnon/fatcontext v0.5.2 // indirect
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect
github.com/alecthomas/go-check-sumtype v0.1.4 // indirect
github.com/alexkohler/nakedret/v2 v2.0.4 // indirect
Expand All @@ -39,9 +39,9 @@ require (
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/charithe/durationcheck v0.0.10 // indirect
github.com/chavacava/garif v0.1.0 // indirect
github.com/ckaznocha/intrange v0.1.2 // indirect
github.com/ckaznocha/intrange v0.2.0 // indirect
github.com/curioswitch/go-reassign v0.2.0 // indirect
github.com/daixiang0/gci v0.13.4 // indirect
github.com/daixiang0/gci v0.13.5 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/denis-tingaikin/go-header v0.5.0 // indirect
github.com/ettle/strcase v0.2.0 // indirect
Expand All @@ -59,7 +59,7 @@ require (
github.com/go-toolsmith/astp v1.1.0 // indirect
github.com/go-toolsmith/strparse v1.1.0 // indirect
github.com/go-toolsmith/typep v1.1.0 // indirect
github.com/go-viper/mapstructure/v2 v2.0.0 // indirect
github.com/go-viper/mapstructure/v2 v2.1.0 // indirect
github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gofrs/flock v0.12.1 // indirect
Expand Down Expand Up @@ -116,25 +116,25 @@ require (
github.com/nunnatsa/ginkgolinter v0.16.2 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/polyfloyd/go-errorlint v1.6.0 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/quasilyte/go-ruleguard v0.4.2 // indirect
github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 // indirect
github.com/quasilyte/go-ruleguard/dsl v0.3.22 // indirect
github.com/quasilyte/gogrep v0.5.0 // indirect
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
github.com/ryancurrah/gomodguard v1.3.3 // indirect
github.com/ryancurrah/gomodguard v1.3.5 // indirect
github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect
github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect
github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
github.com/sashamelentyev/usestdlibvars v1.27.0 // indirect
github.com/securego/gosec/v2 v2.20.1-0.20240822074752-ab3f6c1c83a0 // indirect
github.com/securego/gosec/v2 v2.21.2 // indirect
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sivchari/containedctx v1.0.3 // indirect
Expand All @@ -153,7 +153,7 @@ require (
github.com/stretchr/testify v1.9.0 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/tdakkota/asciicheck v0.2.0 // indirect
github.com/tetafro/godot v1.4.16 // indirect
github.com/tetafro/godot v1.4.17 // indirect
github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect
github.com/timonwong/loggercheck v0.9.4 // indirect
github.com/tomarrell/wrapcheck/v2 v2.9.0 // indirect
Expand All @@ -172,12 +172,12 @@ require (
go.uber.org/automaxprocs v1.5.3 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // indirect
golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/tools v0.24.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
Loading